Run Qwen3.8 27B Xploded in Claude Code
A small uncensored Qwen with half a million tokens of context and tool calling at $0.30 in and $2.40 out per million. The budget pick for long agent runs.
| Model id | qwen3.8-27b-xploded |
|---|---|
| Context | 524k tokens |
| Input price | $0.300 / million tokens |
| Output price | $2.40 / million tokens |
| Tool calling | Supported |
Set it up
Point Claude Code's base URL at Wild West API (no /v1), set the auth token to your key, name this model, and set the context length to its real value of 524,288:
# Put these in your shell profile, then run: claude export ANTHROPIC_BASE_URL=https://wildwestapi.com export ANTHROPIC_AUTH_TOKEN=sk-ww-... export ANTHROPIC_MODEL=qwen3.8-27b-xploded export ANTHROPIC_DEFAULT_HAIKU_MODEL=outlaw-1-xploded export CLAUDE_CODE_MAX_CONTEXT_TOKENS=524288
Or put the same values under env in ~/.claude/settings.json:
// ~/.claude/settings.json { "env": { "ANTHROPIC_BASE_URL": "https://wildwestapi.com", "ANTHROPIC_AUTH_TOKEN": "sk-ww-...", "ANTHROPIC_MODEL": "qwen3.8-27b-xploded", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "outlaw-1-xploded", "CLAUDE_CODE_MAX_CONTEXT_TOKENS": "524288" } }
ANTHROPIC_DEFAULT_HAIKU_MODEL is the cheap background model, set to outlaw-1-xploded above. CLAUDE_CODE_MAX_CONTEXT_TOKENS is set because Claude Code assumes 200K for an id it does not recognise. Use ANTHROPIC_AUTH_TOKEN and leave ANTHROPIC_API_KEY unset. Full setup and every caveat is in the Claude Code guide.
FAQ
Can Qwen3.8 27B Xploded edit files and run commands in Claude Code?
Yes. It supports tool calling, which is what Claude Code needs to use its Read, Edit, Write and Bash tools. A model without tool calling could only chat.
How much does it cost?
$0.300 per million input tokens and $2.40 per million output tokens through Wild West API. Put a spend cap on the key so an agent loop cannot overrun it.
Is this an official Anthropic setup?
No. Anthropic does not officially support routing Claude Code to non-Claude models through a gateway. It works because Wild West API translates the Messages API, but it is not a configuration Anthropic backs.