Qwen Code, Alibaba’s open-source coding agent, no longer has a free sign-in: Qwen OAuth is discontinued, and its free tier ended on 15 April 2026. You now give it an Alibaba key, a key from another provider, or a model on your own machine. It is Apache-2.0 licensed and runs in a terminal, in VS Code, Zed and JetBrains, and as a desktop app.
How do I install Qwen Code?
Pick one:
npm install -g @qwen-code/qwen-code@latest
That needs Node.js 22 or later. Or brew install qwen-code on macOS and Linux. Or the standalone installer; on Windows PowerShell:
irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
macOS and Linux:
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
Restart the terminal, then run qwen. A desktop app for macOS, Windows and Linux is published as a release on the GitHub page.
How do I sign in?
Run qwen, then /auth at any time. The menu has four entries:
| Entry | What it is |
|---|---|
| QwenCloud | Token Plan or a standard API key, on the China or International platform |
| Alibaba ModelStudio | Coding Plan, Token Plan or a standard API key |
| Third-party Providers | A key for DeepSeek, Grok, MiniMax, Z.AI, Kimi, Idealab, ModelScope, OpenRouter or Requesty |
| Custom Provider | Any local server, proxy or compatible endpoint: OpenAI, Anthropic or Gemini style |
The settings live in ~/.qwen/settings.json. Plan setups, endpoints and the environment variable for each key are on the Alibaba Cloud Model Studio page. The standalone qwen auth command has been removed.
What does Qwen Code do well?
- It takes four API styles: OpenAI, Anthropic, Gemini and Vertex AI, so the same agent drives Qwen, Claude, Gemini or a local server.
- It has the usual agent parts: sub-agents, skills, MCP, hooks, approval modes, and a headless mode for scripts and CI, such as
qwen -p "summarise this log". - It fits the Qwen coding models: the Qwen3-Coder-Next model card lists Qwen Code among the tools it works with, and Ollama’s page for that model says the same.
- Free to run locally: the agent costs nothing and Ollama or vLLM serve the model, so the only cost is hardware. Models and memory are in best Qwen model for coding.
- It reaches Alibaba’s plans directly: Coding Plan and Token Plan are menu entries.
What does it lack?
- No free hosted tier. Hosted use needs a plan or a pay-as-you-go key.
- The plans restrict what you can do with the key. Coding Plan is for interactive use in programming tools; scripts and backends are prohibited. Token Plan is described as billed in Credits for interactive use in compatible tools.
- The VS Code extension, Qwen Code Companion, is labelled Beta.
- Its first-run menu leads with Alibaba’s products. QwenCloud and Alibaba ModelStudio come before the third-party providers.
Qwen Code or another agent?
Qwen models aren’t tied to Qwen Code. Alibaba publishes setups for several agents.
| Agent | Qwen how | Good for | Watch out |
|---|---|---|---|
| Qwen Code | /auth → Alibaba ModelStudio | The shortest path to Alibaba’s plans | Alibaba’s own menus |
| Claude Code | Anthropic-compatible endpoint, ANTHROPIC_BASE_URL | You like Claude Code’s interface | Anthropic doesn’t support non-Claude models in Claude Code |
| OpenCode | Custom provider in opencode.json | Switching models freely | Not built in; you write the provider block |
| Codex CLI | [model_providers.*] in config.toml | You already use Codex | Version rules for the Responses API; see below |
| Cline | OpenAI Compatible provider | Working inside VS Code | You type the Base URL and model name yourself |
| Contenox | Its own Alibaba Cloud Model Studio provider | A desktop app instead of a terminal | Qwen next to DeepSeek, OpenAI, Anthropic and local models |
The Codex-version trap: Codex 0.94.0 and later speak only the Responses API. Alibaba’s Codex page says Coding Plan needs Chat Completions and Codex 0.93.0 or earlier, so a Coding Plan key and a current Codex don’t mix. Token Plan and pay-as-you-go use responses.
Step-by-step configs for Claude Code, Codex and OpenCode are on the Qwen page. For Claude Code itself see Claude Code alternatives, and for Cline see Cline alternatives.
Which models does it run?
Whichever the plan or provider offers. On Token Plan, Alibaba’s Qwen Code setup lists Qwen3.8 Max and Flash, Qwen3.7 Max and Plus, DeepSeek V4.1 Flash and GLM-5.3. On Coding Plan, Qwen3.7 Plus, Qwen3.6 Plus, Qwen3.5 Plus, Kimi K2.5, GLM-5 and MiniMax M2.5. The lists change, so Qwen Coding Plan and Token Plan is dated.
If a new model is missing from the menu, upgrade Qwen Code first, then add the model by hand under modelProviders.openai in settings.json and restart.
Contenox
Contenox is a desktop app for people who don’t want a terminal agent. It has Alibaba Cloud Model Studio as a provider of its own: paste the key, pick a Qwen model in the Model chip, and the agent runs under permission rules you can read. Setup: Qwen coding agent.
Related
- Qwen coding agent: API key, models and setup
- Open-source AI coding agents: Qwen Code next to the rest
- Terminal coding agents
- Best Ollama models for coding