# OpenCode

URL: https://bridge.wekoya.tech/docs/opencode
Updated: 2026-12-05

> Run OpenCode on Bridge as a custom OpenAI-compatible provider: one block in opencode.json, your key in an environment variable, any model with tool calling, paid in naira.

OpenCode, the open-source terminal coding agent, runs on Bridge as a custom provider: one block in its config file, your key in an environment variable, and every Bridge model with tool calling is yours to use, paid in naira.
1. Install OpenCode if you have not: `curl -fsSL https://opencode.ai/v2/install | bash`, or `npm install -g @opencode/cli`.
2. Add Bridge to your global config, `~/.config/opencode/opencode.json`. A project's own `opencode.json` works too, and the key stays out of it either way: it is read from the environment.

```
{
  "$schema": "https://opencode.ai/config.json",
  "model": "bridge/claude-sonnet-5-5",
  "providers": {
    "bridge": {
      "name": "Bridge by Wekoya",
      "env": ["WEKOYA_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://wekoya-api.wekoya.tech/v1"
      },
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" },
        "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" }
      }
    }
  }
}
```
3. Set your key and start it. On Windows, `$env:WEKOYA_API_KEY = "wk_live_..."` in PowerShell.

```
export WEKOYA_API_KEY=wk_live_...
opencode
```

- `model` is `provider/model`: `bridge/claude-sonnet-5-5`. Switch in a session with `/models`.
- Add any Bridge model to `models` by its ID, with the name you want to see. The ID must match the models page exactly.
- This uses Chat Completions, which every Bridge model answers. OpenCode also has Responses and Anthropic-compatible packages; Chat Completions is the one to pick for a mix of models.
- Using [Wekoya Code](https://code.wekoya.tech)? It is built on OpenCode and already set up for Bridge: run `wekoya login`, nothing else.
