Skip to content

How to Run Qwen3-Coder With Claude Code on Windows

Run Qwen3-Coder with Claude Code on Windows via Claude Code Router and Alibaba's DashScope. API key, config, big-context coding, pricing and coding plan, and fixes.

MGMCSA Guru Team June 24, 2026 3 min read
Claude Code on Windows routed to Qwen3-Coder through DashScope

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 maxtoken transformer; some defaults exceed what the endpoint accepts.
  • Tool calls misbehaving — the enhancetool transformer hardens them.
  • Auth errorsDASHSCOPE_API_KEY not set, or you used the mainland endpoint instead of dashscope-intl.
  • Config not applied — run ccr restart after 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.

Frequently asked questions

Does Qwen work with Claude Code?

Yes, via Claude Code Router. Qwen3-Coder runs on Alibaba's DashScope, which is OpenAI-compatible, so you add it as a provider in Claude Code Router's config and route Claude Code through it. Qwen doesn't expose an Anthropic endpoint, so the router is the clean path.

What's special about Qwen3-Coder?

It's tuned for tool calling and agentic coding, and the Coder models offer very large context windows (up to about 1M tokens), which suits big repositories and long sessions. That makes it a strong pick when context size matters.

Does Qwen have a coding plan?

Alibaba offers a Coding Plan (around $50/month for roughly 90,000 requests) that includes Qwen plus select third-party models, alongside standard pay-per-token. Heavy daily users often save with the plan; light users do better paying per token.

What's the DashScope base URL?

The international OpenAI-compatible endpoint is https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions. Use that in Claude Code Router's api_base_url for the Qwen provider.

Are there cache discounts?

Yes. Alibaba applies a cache-hit discount on input tokens (commonly around 75% off the cached portion), which helps for agentic coding that reuses context. Confirm current terms on Model Studio's pricing docs.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.