Qwen3-Coder is one of the better budget choices for agentic work — tuned for tool calling and capable of very large context windows, which makes it shine on big repositories. It runs on Alibaba’s DashScope platform, and since that’s OpenAI-compatible rather than Anthropic-compatible, the clean way to use it with Claude Code is through Claude Code Router.
This is the Windows setup: key, router config, model choice, and the pricing options (including Alibaba’s coding plan). For the router itself, see Claude Code Router setup on Windows.
Step 1: Get a DashScope API key
Sign up for Alibaba Cloud Model Studio and create an API key for DashScope. Use the international endpoint (Singapore region) unless you’re in mainland China.
Step 2: Install Claude Code and the router
npm install -g @anthropic-ai/claude-code
npm install -g @musistudio/claude-code-router
On Windows, WSL gives the smoother shell — see the WSL install guide.
Step 3: Add Qwen to the router config
Edit ~/.claude-code-router/config.json (on Windows, C:\Users\YourName\.claude-code-router\config.json):
{
"Providers": [
{
"name": "dashscope",
"api_base_url": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
"api_key": "$DASHSCOPE_API_KEY",
"models": ["qwen3-coder-plus"],
"transformer": {
"use": [["maxtoken", { "max_tokens": 65536 }], "enhancetool"]
}
}
],
"Router": {
"default": "dashscope,qwen3-coder-plus",
"longContext": "dashscope,qwen3-coder-plus",
"longContextThreshold": 200000
}
}
The maxtoken and enhancetool transformers keep token limits and tool calls reliable with Qwen. Export the key and run:
export DASHSCOPE_API_KEY="sk-your-key"
ccr code
Step 4: Pick the model
Qwen models for coding
| qwen3-coder-plus | Agentic coding, tool calling, big context |
|---|---|
| qwen3-max | Flagship general model (API-only, pricier) |
| qwen3.5-plus | Strong general model at low cost |
For agentic coding in Claude Code, qwen3-coder-plus is the natural default. Confirm current model IDs on Model Studio, as they update with releases.
Pricing and the coding plan
Qwen offers two routes, and you can mix them:
- Pay-per-token on DashScope, with a cache-hit discount on repeated input (commonly around 75% off the cached portion) — good for agentic sessions that reuse context.
- Alibaba Coding Plan — a flat subscription (around $50/month for roughly 90,000 requests) that also includes select third-party models like Kimi, GLM, and MiniMax. Better for heavy daily use.
See Alibaba Coding Plan vs pay-per-token for which fits your volume.
Troubleshooting
- Token-limit errors — keep the
maxtokentransformer; some defaults exceed what the endpoint accepts. - Tool calls misbehaving — the
enhancetooltransformer hardens them. - Auth errors —
DASHSCOPE_API_KEYnot set, or you used the mainland endpoint instead ofdashscope-intl. - Config not applied — run
ccr restartafter editing.
Qwen + Claude Code checklist
- DashScope (Model Studio) API key created
- Claude Code + Claude Code Router installed
- dashscope provider added with the intl /compatible-mode/v1 URL
- maxtoken + enhancetool transformers set
- Launched with ccr code; restarted after edits
Wrapping up
Running Qwen3-Coder with Claude Code means routing through Claude Code Router to Alibaba’s DashScope: add the dashscope provider with the international /compatible-mode/v1 endpoint, the maxtoken and enhancetool transformers, and qwen3-coder-plus. Lean on its big context window for large repos, and choose between pay-per-token and the coding plan based on volume.
For other tools, see Qwen3-Coder with Codex CLI and Qwen Code CLI on Windows.