OpenCode
Runs an open-source coding agent with configurable model providers. Point it at ExoticRouter with a base URL and a key: here are the values, and where they go in OpenCode.
What to enter
Section titled “What to enter”| Setting | Value |
|---|---|
| Base URL, OpenAI-compatible API | https://api.exoticrouter.com/v1 |
| Base URL, Anthropic API | https://api.exoticrouter.com |
| API key | Your key, from the API keys page |
| Model | An id such as anthropic/claude-sonnet-5-5, from the models page |
A tool that adds /v1 to the address by itself is given https://api.exoticrouter.com instead.
The config file
Section titled “The config file”An example with a handful of models and a stand-in for the key. Put your own key where it says sk-er-YOUR-KEY.
opencode.json goes here:
| System | Path |
|---|---|
| macOS | ~/.config/opencode/opencode.json |
| Linux | ~/.config/opencode/opencode.json |
| Windows | %USERPROFILE%\.config\opencode\opencode.json |
{ "$schema": "https://opencode.ai/config.json", "provider": { "exoticrouter": { "npm": "@ai-sdk/openai-compatible", "name": "ExoticRouter", "options": { "baseURL": "https://api.exoticrouter.com/v1", "apiKey": "sk-er-YOUR-KEY" }, "models": { "anthropic/claude-fable-5-2": { "name": "Claude Fable 5.2", "limit": { "context": 1000000, "output": 64000 }, "tool_call": true, "reasoning": true, "attachment": true }, "anthropic/claude-haiku-5-5": { "name": "Claude Haiku 5.5", "limit": { "context": 1000000, "output": 64000 }, "tool_call": true, "reasoning": true, "attachment": true }, "anthropic/claude-opus-5": { "name": "Claude Opus 5", "limit": { "context": 1000000, "output": 64000 }, "tool_call": true, "reasoning": true, "attachment": true }, "anthropic/claude-opus-5-5": { "name": "Claude Opus 5.5", "limit": { "context": 1000000, "output": 128000 }, "tool_call": true, "reasoning": true, "attachment": true }, "anthropic/claude-sonnet-5": { "name": "Claude Sonnet 5", "limit": { "context": 1000000, "output": 64000 }, "tool_call": true, "reasoning": true, "attachment": true }, "anthropic/claude-sonnet-5-5": { "name": "Claude Sonnet 5.5", "limit": { "context": 1000000, "output": 64000 }, "tool_call": true, "reasoning": true, "attachment": true }, "openai/gpt-6.1-sol": { "name": "GPT-6.1 Sol", "limit": { "context": 1050000, "output": 128000 }, "tool_call": true, "reasoning": true, "attachment": true }, "openai/gpt-6.2-astra": { "name": "GPT-6.2 Astra", "limit": { "context": 1050000, "output": 128000 }, "tool_call": true, "reasoning": true, "attachment": true }, "openai/gpt-6.2-sol": { "name": "GPT-6.2 Sol", "limit": { "context": 1050000, "output": 128000 }, "tool_call": true, "reasoning": true, "attachment": true }, "360/gpt-6.1-sol": { "name": "gpt-6.1-sol", "limit": { "context": 128000, "output": 16384 } } } } }, "model": "exoticrouter/anthropic/claude-opus-5-5"}If the file is there already, add this to it and keep the settings you have.
Start opencode and pick a model with /models: they are listed under ExoticRouter.
Installing OpenCode
Section titled “Installing OpenCode”If OpenCode is not on the machine yet, this is its own installer:
| System | Command |
|---|---|
| macOS | curl -fsSL https://opencode.ai/install | bash |
| Linux | curl -fsSL https://opencode.ai/install | bash |
| Windows | npm install -g opencode-ai |
The models it can use
Section titled “The models it can use”| API | Models |
|---|---|
| OpenAI-compatible | Every text model in the catalogue |
| Anthropic | The Claude models |
The setting is described in OpenCode’s own documentation.
More coding agents
Section titled “More coding agents”- Claude Code: Works on a codebase from the terminal, IDE, or web.
- Codex: Works on software engineering tasks through a coding agent.
- Kilo Code: Open-source coding agent for editing and working with repositories.
- Qwen Code: Runs the Qwen coding agent in a terminal.
- Gemini CLI: Brings Google’s Gemini agent into a terminal.
- Goose: Runs an extensible local agent for engineering work.