Use PaletteAI Inference Launchpad with OpenCode
This guide explains how to connect OpenCode to a PaletteAI Inference Launchpad appliance so that a model running on the
appliance serves every request instead of a cloud provider. OpenCode reaches the appliance through its OpenAI-compatible
/v1 API, so you trust the appliance certificate, add a custom provider to the OpenCode configuration file, and confirm
the connection.
The console assembles these values for you. In the Connect a coding agent panel, the OpenCode tab lists the
steps and generates the configuration for bash, zsh, or PowerShell. For what each field does, refer to
OpenCode Configuration.
Prerequisites
- OpenCode installed and already working. For installation details, refer to the OpenCode website.
- A running PaletteAI Inference Launchpad appliance with at least one model deployed and serving. To deploy a model, refer to Deploy a Model.
- An API token for the appliance. To create one, refer to Generate an API Token, or use a token an administrator generated for you.
- Network access from your machine to the appliance. OpenCode sends each request from the machine it runs on, so an appliance on a private network works.
Download the Platform CA Certificate
When the appliance serves HTTPS with a certificate issued by its own platform Certificate Authority (CA), the connect panel offers that CA certificate as a download. Your machine does not trust the platform CA yet, so download the certificate before you configure the agent.
-
In the console, open the Connect a coding agent panel. Select Connect Coding Agent on the homepage, select Connect a Coding Agent in the Create API token dialog that reveals a new token, or select Connect Agent in the dialog that finishes the Add client wizard.
-
Select the tab for your agent, and then select CA certificate. The browser saves
palette-ai-inference-launchpad-ca.crtto yourDownloadsfolder.
If the panel shows no CA certificate step, the appliance does not need one. Skip this section and every later step that points at the downloaded file.
Configure OpenCode
-
Add the following provider to an
opencode.jsonfile. Use~/.config/opencode/opencode.jsonto apply the provider to every project, oropencode.jsonin a project directory to apply it to that project only. Replace<appliance-host>with your appliance address.{
"$schema": "https://opencode.ai/config.json",
"provider": {
"launchpad": {
"npm": "@ai-sdk/openai-compatible",
"name": "PaletteAI Inference Launchpad",
"options": {
"baseURL": "https://<appliance-host>/v1",
"apiKey": "{env:LAUNCHPAD_API_KEY}"
},
"models": {
"claude-opus-4-8": {
"name": "Claude Opus",
"tool_call": true,
"reasoning": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 200000, "output": 64000 }
}
}
}
}
} -
Run the following commands in your shell. The configuration file reads the token from the environment, so the token never lands in the file. Replace
<lpai-token>with your token.export NODE_EXTRA_CA_CERTS=$HOME/Downloads/palette-ai-inference-launchpad-ca.crt
export LAUNCHPAD_API_KEY=<lpai-token>Include the
NODE_EXTRA_CA_CERTSline only when the panel shows the CA certificate step. OpenCode runs on Node.js, and this variable adds the platform CA to the certificates Node.js trusts, so certificate verification stays on. Set it in the shell before you start OpenCode. On PowerShell, the panel writes the same path as$env:USERPROFILE\Downloads\palette-ai-inference-launchpad-ca.crt.
Verify the Connection
-
Run a single prompt to confirm the appliance answers. The
--modelflag takes aprovider/modelvalue that combines the provider key from your configuration file with a model name.opencode run --model launchpad/claude-opus-4-8 "reply with exactly OPENCODE_OK"Expected outputOPENCODE_OKA reply confirms that the certificate, base URL, token, provider, and model routing all work.
-
Start an interactive session, and then select the
claude-opus-4-8model.opencode
If you use a reasoning model and the reply comes back empty, raise the output limit. Hidden reasoning tokens can consume a small output budget entirely, which leaves no room for the visible reply.
Request Routing and Quotas
Requests you send through the appliance are subject to the routing rule and quota configured for your client. If an
operator configured a routing rule for your token, the appliance can redirect a request to a frontier model instead of a
local one. Quotas apply to the client, so every API token that belongs to the client draws on the same limits. When the
client exhausts a quota, the appliance returns an HTTP 429 response.
To understand what a client is and how API keys and quotas govern usage, refer to Clients and Quotas. To understand how the Tier map and the semantic router combine to pick a model for each request, refer to Routing Behavior.
Next Steps
To look up each configuration value, refer to OpenCode Configuration. To connect a different coding tool, refer to Use PaletteAI Inference Launchpad with Claude Code, Use PaletteAI Inference Launchpad with Cursor, or Use PaletteAI Inference Launchpad with OpenAI Codex. To deploy another model to the appliance, refer to Deploy a Model.