uncensored opencode

Quickstart: opencode

One provider block in opencode.json. opencode then lists the models under Uncensored Opencode in /models.

The config

Put this in opencode.json at the root of a project, or in ~/.config/opencode/opencode.json to have it everywhere, with your key in UNCENSORED_OPENCODE_API_KEY.

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"
}

Check it

shell
opencode models uncensored-opencode
opencode run --model uncensored-opencode/glm-5.3-flash-uncensored "Explain what this repository does"

The first command prints one line per model in your block. If it prints nothing, opencode did not read the file: run it from the folder that holds opencode.json.

Set the limit

opencode assumes a 200,000 token context for a model it does not know and compacts the session early. The limit line gives it the real figure. If you give a limit, give both context and output.

The block with every model filled in, and what each field does, is on the opencode page of the main site.