Integrations

Use uncensored models in OpenCode

A custom provider in opencode.json. OpenCode v2 renamed the keys: providers, package, settings.

OpenCode loads custom providers from opencode.json / opencode.jsonc in the project, or ~/.config/opencode/opencode.json globally.

v2 config

json
{
  "$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 }
        }
      }
    }
  }
}
shell
export CHAINLESS_API_KEY="cl-..."
opencode

Pick the model with /models, or keep the "model" line above as the default.

What changed in v2

v1v2
providerproviders
npm: "@ai-sdk/openai-compatible"package
options.baseURLsettings.baseURL
options.apiKeysettings.apiKey (for example "{env:CHAINLESS_API_KEY}") or env
tool_callcapabilities.tools

v1 config (still accepted)

json
{
  "$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.

Other tools

Questions

My old provider block still works. Do I have to migrate?

No. OpenCode still loads the v1 shape (provider, npm, options). Do not mix the two formats inside one provider block.

Why does OpenCode think the context is 200k?

Models that are not in OpenCode's catalog are assumed to have 200k context and 32k output. Set limit.context and limit.output as shown on this page.

Which package should I use?

The openai-compatible package. Avoid the openai-compatible/responses variant: Chainless serves Chat Completions only.