OpenCode loads custom providers from opencode.json / opencode.jsonc in the project, or ~/.config/opencode/opencode.json globally.
v2 config
{
"$schema": "https://opencode.ai/config.json",
"model": "chainless/kimi-k3.1-pro-uncensored",
"providers": {
"chainless": {
"name": "Chainless",
"env": ["CHAINLESS_API_KEY"],
"package": "@opencode/ai/providers/openai-compatible",
"settings": { "baseURL": "https://chainless.one/v1" },
"models": {
"kimi-k3.1-pro-uncensored": {
"name": "Kimi K3.1 Pro Uncensored",
"capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1048576, "output": 131072 }
},
"glm-5.3-fast-uncensored": {
"name": "GLM 5.3 Fast Uncensored",
"capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1048576, "output": 131072 }
}
}
}
}
}export CHAINLESS_API_KEY="cl-..."
opencodePick the model with /models, or keep the "model" line above as the default.
What changed in v2
| v1 | v2 |
|---|---|
provider | providers |
npm: "@ai-sdk/openai-compatible" | package |
options.baseURL | settings.baseURL |
options.apiKey | settings.apiKey (for example "{env:CHAINLESS_API_KEY}") or env |
tool_call | capabilities.tools |
v1 config (still accepted)
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"chainless": {
"npm": "@ai-sdk/openai-compatible",
"name": "Chainless",
"options": { "baseURL": "https://chainless.one/v1", "apiKey": "{env:CHAINLESS_API_KEY}" },
"models": { "kimi-k3.1-pro-uncensored": { "name": "Kimi K3.1 Pro Uncensored", "limit": { "context": 1048576, "output": 131072 } } }
}
},
"model": "chainless/kimi-k3.1-pro-uncensored"
}The guides page generates the full config with every public model and its limits. Model ids and limits: /models.
Sources
Checked against the official documentation on 2026-11-29. Tools change their settings often; if a field moved, the source below is the reference.