Skip to content
exoticrouter.com ↗

Qwen Code

Runs the Qwen coding agent in a terminal. Point it at ExoticRouter with a base URL and a key: here are the values, and where they go in Qwen Code.

Setting Value
Base URL, OpenAI-compatible API https://api.exoticrouter.com/v1
Base URL, Anthropic API https://api.exoticrouter.com
Base URL, Gemini 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.

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.

settings.json goes here:

System Path
macOS ~/.qwen/settings.json
Linux ~/.qwen/settings.json
Windows %USERPROFILE%\.qwen\settings.json
settings.json
{
"env": {
"EXOTICROUTER_API_KEY": "sk-er-YOUR-KEY"
},
"modelProviders": {
"openai": [
{ "id": "anthropic/claude-fable-5-2", "name": "Claude Fable 5.2", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "anthropic/claude-haiku-5-5", "name": "Claude Haiku 5.5", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "anthropic/claude-opus-5", "name": "Claude Opus 5", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "anthropic/claude-opus-5-5", "name": "Claude Opus 5.5", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "anthropic/claude-sonnet-5", "name": "Claude Sonnet 5", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "anthropic/claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1000000 }, "capabilities": { "vision": true } },
{ "id": "openai/gpt-6.1-sol", "name": "GPT-6.1 Sol", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1050000 }, "capabilities": { "vision": true } },
{ "id": "openai/gpt-6.2-astra", "name": "GPT-6.2 Astra", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1050000 }, "capabilities": { "vision": true } },
{ "id": "openai/gpt-6.2-sol", "name": "GPT-6.2 Sol", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 1050000 }, "capabilities": { "vision": true } },
{ "id": "360/gpt-6.1-sol", "name": "gpt-6.1-sol", "envKey": "EXOTICROUTER_API_KEY", "baseUrl": "https://api.exoticrouter.com/v1", "generationConfig": { "contextWindowSize": 128000 } }
]
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "anthropic/claude-opus-5-5"
}
}

If the file is there already, add this to it and keep the settings you have.

Start qwen and pick a model with /model. Run /doctor to check that it uses the ExoticRouter key.

If Qwen Code is not on the machine yet, this is its own installer:

System Command
macOS curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
Linux curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
Windows irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
API Models
OpenAI-compatible Every text model in the catalogue
Anthropic The Claude models
Gemini The Gemini models

The setting is described in Qwen Code’s own documentation.

  • Claude Code: Works on a codebase from the terminal, IDE, or web.
  • Codex: Works on software engineering tasks through a coding agent.
  • OpenCode: Runs an open-source coding agent with configurable model providers.
  • Kilo Code: Open-source coding agent for editing and working with repositories.
  • Gemini CLI: Brings Google’s Gemini agent into a terminal.
  • Goose: Runs an extensible local agent for engineering work.