OpenCode
OpenCode routes through the AI SDK's @ai-sdk/openai-compatible adapter, so Nimbus plugs in as a first-class provider. Every Nimbus model shows up in the picker alongside built-ins.
OpenCode's opencode.json supports custom providers through the provider key. Point one at Nimbus and declare which models you want the picker to expose — each entry can flag multimodal input, tool calling, and reasoning support so OpenCode routes the right UI.
Prerequisites
- OpenCode 0.4+ (older versions used a different provider schema).
- A Nimbus API key (
sk-nim-...). - An
opencode.jsonat your project root or~/.config/opencode/opencode.jsonfor the global config.
Install
OpenCode ships the adapter package in its bundle — nothing to install.
npm i -g opencode-aiConfigure
Drop this into opencode.json. Add as many entries under models as you want in the picker.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"nimbus": {
"npm": "@ai-sdk/openai-compatible",
"name": "Nimbus",
"options": {
"baseURL": "https://llm.nimbusapi.net/v1",
"apiKey": "sk-nim-..."
},
"models": {
"anthropic/claude-opus-4.8": {
"attachment": true,
"tool_call": true,
"reasoning": true,
"modalities": { "input": ["text", "image"], "output": ["text"] }
},
"anthropic/claude-sonnet-4.6": {
"attachment": true,
"tool_call": true,
"reasoning": true,
"modalities": { "input": ["text", "image"], "output": ["text"] }
},
"openai/gpt-5.1": {
"attachment": true,
"tool_call": true,
"reasoning": true,
"modalities": { "input": ["text", "image"], "output": ["text"] }
}
}
}
}
}For local dev, drop the key into an env var instead of the JSON. OpenCode expands ${env:NAME} at load time:
"apiKey": "${env:NIMBUS_API_KEY}"First call
Start OpenCode from the project root:
opencodeOpen the model picker (/model) — you should see a Nimbus group with every entry you declared. Pick one and type a prompt; the request hits llm.nimbusapi.net/v1/chat/completions and streams back through the adapter. Confirm it landed by checking the Nimbus dashboard's live Requests view.
Troubleshooting
- "Provider Nimbus not found":
opencode.jsonis invalid — a trailing comma or unescaped backslash. Runjq . opencode.jsonto confirm it parses. - Model picker is empty for Nimbus: you forgot the
modelsmap. OpenCode does not auto-discover from/v1/models— every model you want must be declared explicitly. - 401 Unauthorized:
apiKeystill contains the literalsk-nim-...placeholder, or the${env:...}variable is unset in the shell you launched OpenCode from. - Reasoning UI missing: the model entry omits
"reasoning": true. OpenCode gates the collapsed-thoughts panel on that flag. - Image attachments rejected: the model entry omits
"attachment": trueor themodalities.inputarray doesn't include"image". Fix the entry and reload — see Images for the wire format Nimbus expects.