Short answer
“Qwen Claude Code” can mean two things. You can keep Claude Code as the coding-agent client and configure an Alibaba Cloud Model Studio model as its backend through the documented Anthropic-compatible connection. Or you can use Qwen Code, a separate coding agent whose README says it supports Anthropic and other API protocols. These are different setups: API compatibility does not make Qwen and Claude the same model or establish equal coding quality. [1][2]
If you want Claude Code with a Qwen backend, follow the Model Studio setup below. If you want to change the coding agent itself, assess Qwen Code separately.
Choose the route that matches your goal
| Goal | Route | What changes |
|---|---|---|
| Keep Claude Code, but route model requests to Qwen | Model Studio’s Claude Code integration | Claude Code remains the client; you configure a Model Studio endpoint, matching API key, and model mapping. |
| Try a separate coding agent that supports multiple provider APIs | Qwen Code | You install and run Qwen Code, then configure a provider. Its README’s protocol-support claim does not establish Claude-subscription compatibility or equivalent behavior. |
Choose based on your required workflow and provider—not a feature checklist treated as proof of parity. If coding quality is decisive, test the actual agent/model combinations on representative tasks.
Connect a Model Studio model to Claude Code
Alibaba’s instructions give separate configurations for Token Plan, pay-as-you-go, and Coding Plan. Each route has its own credential and endpoint; mismatching them can cause an authentication error. The model IDs below are documentation examples, not a guarantee of access for every account or plan. Check the models enabled for your plan before deployment. [1]
| Model Studio route | Credential and endpoint in the example | Example model mapping |
|---|---|---|
| Token Plan | Token Plan API key; https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic |
Main model auto; Haiku qwen3.6-flash; Sonnet qwen3.8-flash; Opus qwen3.8-max |
| Pay-as-you-go | Model Studio API key; the Singapore example uses https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic |
Main, Sonnet, Opus, and subagent qwen3.7-max; Haiku qwen3.6-flash |
| Coding Plan | Coding Plan API key; https://coding-intl.dashscope.aliyuncs.com/apps/anthropic |
qwen3.7-plus for main, Haiku, Sonnet, Opus, and subagent |
Coding Plan eligibility and quota
For the international Pro Coding Plan, Alibaba’s plan page lists qwen3.7-plus and qwen3.6-plus among its supported exact model versions; it says model versions not on the list are unsupported. The page lists Pro at $50/month, with caps of up to 6,000 requests per 5 hours, 45,000 per week, and 90,000 per month. The three caps apply simultaneously; reaching any one pauses calls. They are not cumulative or a guarantee of evenly distributed capacity. [3]
Alibaba says a query consumes quota according to the number of model calls: simple tasks typically use 5–10 calls, while complex tasks may use 10–30 or more; actual usage varies with task complexity, context, and tool use. Check the plan page for account-specific terms and usage. [3]
Example: Coding Plan in a terminal
This follows Alibaba’s Coding Plan example. Replace the placeholder with your Coding Plan API key; do not pair this endpoint with a Token Plan or pay-as-you-go key. The plan page lists qwen3.7-plus as a supported Pro model, while the setup guide uses it in its Coding Plan example. [1][3]
export ANTHROPIC_AUTH_TOKEN="YOUR_CODING_PLAN_API_KEY"
export ANTHROPIC_BASE_URL="https://coding-intl.dashscope.aliyuncs.com/apps/anthropic"
export ANTHROPIC_MODEL="qwen3.7-plus"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="qwen3.7-plus"
export ANTHROPIC_DEFAULT_SONNET_MODEL="qwen3.7-plus"
export ANTHROPIC_DEFAULT_OPUS_MODEL="qwen3.7-plus"
export CLAUDE_CODE_SUBAGENT_MODEL="qwen3.7-plus"
Run Alibaba’s documented smoke test:
claude -p "Hello"
A response is a basic sign that the client can complete a request; it is not a coding-quality or production-load test. Alibaba notes that terminal variables apply only to that terminal session. For persistent configuration, its guide gives ~/.claude/settings.json on macOS/Linux and C:\Users\<username>\.claude\settings.json on Windows. [1]
Pay-as-you-go endpoint caveat: Alibaba’s setup example uses a Singapore workspace-specific endpoint, while its troubleshooting material gives a different generic endpoint. The documentation does not reconcile the two. Do not assume they are interchangeable; confirm the endpoint for your workspace and region, and pair it with the matching Model Studio key. [1]
Verify the route and troubleshoot common issues
-
401 invalid_api_key: Check that the API key belongs to the selected plan and matches its Base URL. The documentation specifies a dedicated key and endpoint for each access method. [1] -
Claude Code still tries to reach Anthropic: First check
/statusand confirm the Base URL and token point to Model Studio. If they are correct but startup still attempts official Anthropic login verification, Alibaba documents a separate onboarding setting in~/.claude.json(Windows:C:\Users\<username>\.claude.json). Add or merge this property into the existing JSON rather than replacing other settings:{ "hasCompletedOnboarding": true }This is separate from the environment settings in
~/.claude/settings.json. After changing configuration, open a new terminal and start Claude Code again. [1] -
CC Switch cannot find a model-list endpoint: Alibaba explains that its Anthropic-compatible route serves the messages endpoint, while CC Switch may probe for a model list. A failed discovery probe does not necessarily prevent use: enter plan-supported model IDs manually in Advanced Options and start a new session. Ensure the URL ends in
/apps/anthropic, without an extra/v1. [1] -
403 AccessDeniedfor a model: Check the model’s lifecycle status and plan eligibility in Model Studio. Alibaba warns that a model approaching deprecation may still appear in listings while API calls are denied. [1]
Is Qwen Code equivalent to Claude Code?
Qwen Code is a separate coding agent. Its README says it supports multiple provider protocols, including Anthropic, and lists capabilities it shares with Claude Code. Those are project-authored claims; they do not prove equivalent implementation or coding results. The README’s SWE-bench Verified range—76.40%–77.80% across seven Qwen Code versions using Qwen 3.7 Max, 500 tasks, and three trials per version—is not a Claude Code comparison. [2]
The available evidence supports setup compatibility, not a quality verdict: Alibaba documents Model Studio model examples for Claude Code, while Qwen Code’s README describes its own protocol support. Neither source provides a like-for-like Qwen-versus-Claude coding evaluation. If quality determines your choice, compare the options on the same repository tasks and success criteria, then review correctness, tool use, and required cleanup. Compatibility alone does not identify a cost winner; compare the specific plan’s price, quota, and terms against your workload.
