uncensored opencode

Add a custom providerto opencode

opencode can talk to any endpoint that speaks the OpenAI chat format. This page goes through the provider block field by field, using this API as the example, and lists the mistakes that most often leave a model missing from /models.

Where the file goes

Both .json and .jsonc are read, so comments are allowed if you name the file opencode.jsonc.

A minimal block

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "uncensored-opencode": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Uncensored Opencode",
      "options": {
        "baseURL": "https://uncensoredopencode.com/v1",
        "apiKey": "{env:UNCENSORED_OPENCODE_API_KEY}"
      },
      "models": {
        "glm-5.3-flash-uncensored": {
          "name": "GLM 5.3 Flash Uncensored",
          "tool_call": true,
          "reasoning": true,
          "attachment": true,
          "limit": { "context": 1048576, "output": 32000 }
        }
      }
    }
  },
  "model": "uncensored-opencode/glm-5.3-flash-uncensored"
}

Field by field

Check it loaded

shell
opencode models uncensored-opencode

That prints one line per model, in the form uncensored-opencode/glm-5.3-flash-uncensored. If it prints nothing, opencode did not read your block.

Mistakes that hide a model

Every model on this API

The opencode page has the block with all 7 models filled in.

ModelBuildContextToolsImagesPer million tokens
GLM 5.3 Flash
glm-5.3-flash-uncensored
Uncensored1M tokensYesYes$0.30 in / $1.00 out
Kimi K3.1 Pro
kimi-k3.1-pro-uncensored
Abliterated1M tokensYesYes$7.50 in / $37.50 out
GLM 5.3
glm-5.3-uncensored
Uncensored1M tokensYesNo$2.00 in / $5.00 out
DeepSeek V4.1 Flash 1017
deepseek-v4.1-flash-1017-uncensored
Abliterated1M tokensYesYes$1.25 in / $2.50 out
MiMo V2.6 Flash
mimo-v2.6-flash-uncensored
Abliterated1M tokensYesYes$1.00 in / $2.00 out
Qwen3.8 27B
qwen3.8-27b-uncensored
Uncensored1M tokensYesYes$1.50 in / $5.00 out
GLM 5.3 Flash Cyber
glm-5.3-flash-cyber
Security-tuned1M tokensYesYesOn the models page

Questions

Can I list models the endpoint does not serve?

You can write them, and opencode will show them, but the first request fails with an unknown model error. List only ids the endpoint returns from /v1/models.

Does a custom provider replace the built-in ones?

No. It sits beside them. Every provider you have configured appears in /models.

Do I have to set a limit?

No, but without one opencode assumes 200,000 tokens of context and 32,000 of output for a model it does not know. For a model with a million tokens of context that means compacting five times sooner than necessary.

Bring your agent.