> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sideren.io/llms.txt
> Use this file to discover all available pages before exploring further.

# opencode on Sideren.

> Add a Sideren provider to opencode.json and pick any catalog model. The @ai-sdk/openai-compatible package carries the wire format.

opencode speaks the OpenAI [Chat Completions](/api/chat-completions) dialect, so it runs on
Sideren like any other OpenAI-compatible provider: point it at the gateway, give it an
`sdn_` key, and use [catalog ids](/models) as model names.

## One command

```sh theme={null}
npx sideren setup --tool opencode --key sdn_your_key
```

The setup helper writes the provider below (into the highest-precedence `opencode.json` on
your machine). See [setup helper](/setup).

## Configure

Add a provider to `opencode.json` (project root, or
`~/.config/opencode/opencode.json` for a global default). The
`@ai-sdk/openai-compatible` package handles the wire format; the model keys must match
[catalog ids](/models) exactly.

```json title="opencode.json" theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "sideren": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Sideren",
      "options": {
        "baseURL": "https://api.sideren.io/v1",
        "apiKey": "sdn_your_key"
      },
      "models": {
        "@sdn/gpt-oss-120b": { "name": "Sideren fast" },
        "@sdn/glm-5": { "name": "Sideren coding" }
      }
    }
  },
  "model": "sideren/@sdn/gpt-oss-120b"
}
```

<Note>
  opencode has had intermittent issues wiring custom OpenAI-compatible providers across
  versions. After setup, confirm the values landed with `opencode debug config`. If you hit
  a 401 or a URL-parse error, move the URL to a provider-level
  `"api": "https://api.sideren.io/v1"` field (next to `"npm"`) instead of `options.baseURL`,
  and/or register the key via `opencode auth login` → "Other" → id `sideren`.
</Note>

## Verify

Start `opencode`, send a trivial prompt, and check `opencode debug config` shows the
provider. To confirm the key works against the gateway without opencode in the loop:

```sh theme={null}
npx sideren test --key sdn_your_key
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.