OpenCode Integration
1. Prerequisites
- Registered and obtained a platform API Key.
- Node.js environment installed.
- OpenCode installed:bash
curl -fsSL https://opencode.ai/install | bash
2. Recommended: One-Command Setup with codesw
codesw writes directly to ~/.config/opencode/opencode.json, filling in the provider, baseURL, apiKey and model list automatically — no proxy, no middleman.
2.1 Install
bash
npm i -g @bumocc/codesw
# or
yarn global add @bumocc/codesw2.2 Run the interactive mode
Just execute:
bash
codeswFollow the prompts:
- Select provider: pick
bumo.ai(BUMO API); if you already have profiles, they are listed at the top — pick one to reuse. - Profile name / API Key / Model / Small model: fill in as prompted. Get the key from the API Keys page.
- Apply to which client: choose
OpenCode.
When it finishes, just run opencode.
3. Launch
bash
opencodeAppendix: Manual Configuration (Alternative)
Open ~/.config/opencode/opencode.json and add the following configuration:
json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"api.bumo.ai": {
"npm": "@ai-sdk/openai-compatible",
"name": "api.bumo.ai",
"options": {
"baseURL": "https://api.bumo.ai/v1",
"apiKey": "YOUR_API_KEY"
},
"models": {
"claude-sonnet-4-6": {
"name": "claude-sonnet-4-6"
},
"gpt-5.3-codex": {
"name": "gpt-5.3-codex"
}
}
}
}
}Replace
YOUR_API_KEYwith your platform API Key.
