Qwen Code is the open-source AI coding agent (Apache-2.0) from Alibaba’s Qwen team. It is set up in four steps: install it, start it in the project with qwen, choose the provider with /auth, and give it a task. Important beforehand: the free Qwen OAuth allowance ended on April 15, 2026 — anyone following an older guide can no longer continue for free that way. This page follows the current /auth menu, shows how to switch to German, explains how to configure a custom endpoint for Claude or GPT, and covers the most important commands. The latest version is v0.24.7, released on npm on September 29, 2026; releases arrive at least weekly, so check your version with qwen --version.
Installation
The commands come from the official README. With the standalone installer, you do not need to provide Node.js yourself; only npm requires Node.js 22 or newer.
# macOS / Linux (offizieller Standalone-Installer)
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.sh | bash
# Windows (PowerShell)
irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex
# npm (benötigt Node.js 22 oder neuer)
npm install -g @qwen-code/qwen-code@latest
# Homebrew (macOS / Linux)
brew install qwen-codeReopen the terminal afterward so the environment variables take effect. Qwen Code was originally based on Google Gemini CLI v0.8.2, but has been developed independently since v0.1 and is no longer synchronized with the original. Gemini CLI settings and quotas do not apply here.
First launch and German interface
cd /pfad/zu/ihrem-projekt
qwen
# in der Sitzung:
/language ui de-DE # Oberfläche auf Deutsch
/language output German # Antworten des Modells auf Deutsch
/auth # Anbieter und API-Key einrichtenAfter /language ui de-DE, Qwen Code displays its own German labels, such as “Authentifizierungsmethode auswählen” or “Werkzeug-Genehmigungsmodus”; this page uses the same terms. The response language is separate and is set with /language output German.
Besides the terminal, there is a desktop app, a web interface in the browser (qwen serve --open, experimental), integrations for VS Code, Zed, and JetBrains, and headless mode for scripts and CI (qwen -p "..."). Everything is in the same free repository; inference is billed separately.
Choose the provider with /auth
/auth (alias /login) opens “Authentifizierungsmethode auswählen” with three top-level options. Anyone who still tries to choose Qwen OAuth sees: “Discontinued — switch to Coding Plan or API Key”.
| Option | What it involves | Billing unit |
|---|---|---|
| Alibaba ModelStudio → Coding Plan | Subscription for individual developers; keys begin with sk-sp- | Requests (Pro $50 per month; limits apply simultaneously: up to 6,000 per 5 hours, 45,000 per week, 90,000 per month) |
| Alibaba ModelStudio → Token Plan | Credit-based plan, currently available only in the Singapore region | Monthly credits (Personal Lite $8 to Pro $80, temporarily discounted) |
| Alibaba ModelStudio → Standard API Key | Existing ModelStudio API key | Tokens, tiered by input length |
| Third-party Providers | Browser sign-in with external providers such as OpenRouter or ModelScope | The respective provider’s plan |
| Custom Provider | Local server, proxy, or unsupported provider (“Use your own API Key”) | The endpoint’s plan |
The three ModelStudio options are not three payment methods for the same bill: the documentation gives each its own endpoint and key, and the key type and baseUrl must match. On October 1, 2026, the Coding Plan was listed as “limited availability, first come first served, replenished daily at 00:00 (UTC+8)” — so it may not be purchasable on a given day. A task consumes multiple model calls on the Coding Plan; Alibaba typically cites 5–10 for simple tasks and 10–30 or more for complex tasks. The English page Qwen Code pricing covers the cost comparison in detail.
Use Claude or GPT: Custom Provider in settings.json
The authentication documentation recommends the modelProviders block in ~/.qwen/settings.json for third-party providers such as OpenAI, Anthropic, Google, OpenRouter, or your own endpoint. For Kunavo, it looks like this:
{
"modelProviders": {
"openai": [
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5 (Kunavo)",
"baseUrl": "https://api.kunavo.com/v1",
"description": "Kunavo, OpenAI-kompatibel",
"envKey": "KUNAVO_API_KEY"
}
]
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "claude-sonnet-5"
}
}# Den Key nicht in settings.json schreiben, sondern in .qwen/.env oder die Umgebung
echo 'KUNAVO_API_KEY=sk-kn-...' >> ~/.qwen/.envFour points that save troubleshooting time:
baseUrlends at/v1. The Model Providers reference explicitly says to set it to the API’s/v1root, not/v1/chat/completions— the SDK appends the path itself. Adding the path results in a 404, not an authentication error.- Where the key is stored. Qwen Code reads it from the environment variable named by
envKey. Order: shell-export, then a.envfile (.qwen/.envrecommended; only the first file found counts), and finallyenvinsettings.json— the key is stored there in plain text. - The file overrides the CLI option. Order: values from
/auth→ selectedmodelProvidersentry → CLI arguments → environment variables →settings.json. That is why--openai-base-urlsometimes appears ineffective.security.auth.apiKeyandsecurity.auth.baseUrlfrom older guides are outdated. - Start with Chat Completions. Without
wireApi, Chat Completions is used. With"responses", there is neither endpoint detection nor automatic fallback. Changes tomodelProvidersalso take effect in an active session (/modelreopen it).
There is no Qwen text model in the Kunavo catalog. So this is not a cheaper route to Qwen, but a way to use Claude or GPT in Qwen Code with prepaid credit. Kunavo also did not run Qwen Code itself against its endpoint; like the English Qwen Code setup page, this configuration comes from the official documentation. Keep a working route while you try it.
First task and important commands
The README essentially suggests this as the first task: “Explain this repository and show me where to start.” It checks file access and tool calls at once — a simple “Hello” does not expose connection problems.
| Command | Use case |
|---|---|
/init | Analyze the current directory and create an initial context file |
/model | Switch models; entries from modelProviders appear grouped by protocol |
/approval-mode | Tool approval mode: default asks before changes, auto-edit approves changes automatically, yolo approves everything including shell and network |
/compress | Replace the history with a summary to save tokens |
/stats (/usage) | Usage statistics; /stats model shows tokens and estimated cost per model |
/restore | Restore files to the state before a tool call |
/resume | Resume an earlier session |
/clear | Clear history and free context |
/help | Command overview |
For yolo and the other automatic modes, the documentation itself warns: use them only in trusted, isolated, or disposable environments. The estimated costs in /stats model are calculated by Qwen Code itself; the actual amount appears in your provider’s usage log.
Limits you should know
- Built-in web search depends on the host. It uses DashScope’s server-side search: enabled for the ModelStudio Standard API Key and Token Plan, as well as entries on a detected DashScope host; disabled for the Coding Plan (not verified there) and for third-party providers and custom endpoints on other hosts (web_search documentation). Alternative: an MCP search server.
- Kunavo only provides chat. Kunavo does not offer embedding, text-to-speech, or speech-recognition models. Qwen Code’s Live Voice requires a DashScope endpoint anyway and continues using its own key, regardless of where the chat model points.
Paying when you try Kunavo
Kunavo uses prepaid balance with no subscription and charges per token. The minimum top-up is $10; the Stripe checkout offers cards (Visa, Mastercard, American Express), Apple Pay, Google Pay, and Link, plus EPS in Austria — SEPA Direct Debit is currently not offered. Stripe offers Pay by Bank only to buyers in the United Kingdom, Ireland, and Finland; in Germany it is currently available only as a closed preview (Stripe documentation, as of October 3, 2026). See Billing for details; create the key with an account. After the first task, the usage log shows the actual amount.
Frequently asked questions
Is Qwen Code free?
The software is (Apache-2.0), but free inference is no longer available. According to the Qwen Code documentation, the free Qwen OAuth allowance was discontinued on April 15, 2026, and Qwen OAuth is no longer selectable in the /auth dialog. Guides mentioning “2,000 free requests per day” describe the state through v0.9.0 in February 2026. Today you pay for inference: through Alibaba Cloud’s Coding Plan, Token Plan, or an API key with token-based billing; through third parties such as OpenRouter; or through your own endpoint.
What do I need to install Qwen Code?
With the official standalone installer (curl on macOS/Linux, irm in PowerShell on Windows), you do not need to install Node.js yourself. The npm installation requires Node.js 22 or newer: npm install -g @qwen-code/qwen-code@latest. With Homebrew: brew install qwen-code. Then reopen the terminal and run qwen in the project directory.
Can I switch Qwen Code’s interface to German?
Yes. During the session, /language ui de-DE switches the interface to German, while /language output German sets the model’s response language. According to the command documentation (checked October 1, 2026), the built-in languages are Simplified Chinese, English, Russian, German, Japanese, Brazilian Portuguese, French, and Catalan.
Can Qwen Code use Claude or GPT models?
Yes. An OpenAI-compatible endpoint under modelProviders in ~/.qwen/settings.json passes the model ID unchanged to the endpoint; if it offers Claude or GPT, it works. baseUrl must end at /v1 — using /v1/chat/completions results in a 404. Kunavo created this configuration from the Qwen Code documentation, but did not run Qwen Code itself against its endpoint.
Why does Qwen Code ignore --openai-base-url?
Because a modelProviders entry takes precedence. The documented order is: values from /auth in the active session, then baseUrl and envKey from the selected modelProviders entry, then CLI arguments, then environment variables, then settings.json. As long as an entry is selected, its baseUrl wins. Edit the entry or remove it if you want the option to take effect.
Checked on October 1, 2026: the Qwen Code README; the authentication, Model Providers, commands, and web_search documentation (main branch); the German UI text (packages/cli/src/i18n/locales/de.js); @qwen-code/qwen-code 0.24.7 on npm; and Alibaba Cloud’s Coding Plan and Token Plan pages. Kunavo did not run Qwen Code against its endpoint.