Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .qwen/skills/qwen-code-claw/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Full reference: https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/ma

### Authentication

Supports Qwen OAuth (browser-based, 100 free requests/day, ending 2026-04-15 — switch to OpenRouter, Fireworks AI, or Alibaba Cloud ModelStudio after that) and OpenAI-compatible API keys.
Supports Alibaba Cloud Coding Plan, OpenAI-compatible API keys, and Qwen OAuth (free tier discontinued 2026-04-15).

Full reference: https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/main/docs/users/configuration/auth.md

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

## 🎉 News

- **2026-04-13**: Qwen OAuth free tier policy update: daily quota adjusted to 100 requests/day (from 1,000). The free tier will be discontinued on 2026-04-15. Consider using [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2840914_2&modelId=qwen3.6-plus) as alternatives.
- **2026-04-15**: Qwen OAuth free tier has been discontinued. To continue using Qwen Code, switch to [Alibaba Cloud Coding Plan](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index), [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or bring your own API key. Run `qwen auth` to configure.

- **2026-04-13**: Qwen OAuth free tier policy update: daily quota adjusted to 100 requests/day (from 1,000).

- **2026-04-02**: Qwen3.6-Plus is now live! Sign in via Qwen OAuth to use it directly, or get an API key from [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2840914_2&modelId=qwen3.6-plus) to access it through the OpenAI-compatible API.

Expand All @@ -30,7 +32,7 @@

Qwen Code is an open-source AI agent for the terminal, optimized for Qwen series models. It helps you understand large codebases, automate tedious work, and ship faster.

- **Multi-protocol, OAuth free tier**: use OpenAI / Anthropic / Gemini-compatible APIs, or sign in with Qwen OAuth for 100 free requests/day (free tier ending 2026-04-15). After that, switch to [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2840914_2&modelId=qwen3.6-plus).
- **Multi-protocol, flexible providers**: use OpenAI / Anthropic / Gemini-compatible APIs, [Alibaba Cloud Coding Plan](https://modelstudio.console.alibabacloud.com/?tab=coding-plan#/efm/coding-plan-index), [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or bring your own API key.
- **Open-source, co-evolving**: both the framework and the Qwen3-Coder model are open-source—and they ship and evolve together.
- **Agentic workflow, feature-rich**: rich built-in tools (Skills, SubAgents) for a full agentic workflow and a Claude Code-like experience.
- **Terminal-first, IDE-friendly**: built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.
Expand Down
13 changes: 6 additions & 7 deletions docs/developers/tools/web-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Use `web_search` to perform a web search and get information from the internet.

### Supported Providers

1. **DashScope** (Official, Free) - Automatically available for Qwen OAuth users (200 requests/minute, 100 requests/day; free tier ending 2026-04-15)
1. **DashScope** (Official) - Available when explicitly configured in settings (Qwen OAuth free tier auto-injection discontinued 2026-04-15)
2. **Tavily** - High-quality search API with built-in answer generation
3. **Google Custom Search** - Google's Custom Search JSON API

Expand Down Expand Up @@ -132,12 +132,11 @@ web_search(query="best practices for React 19", provider="dashscope")

### DashScope (Official)

- **Cost:** Free
- **Authentication:** Automatically available when using Qwen OAuth authentication
- **Configuration:** No API key required, automatically added to provider list for Qwen OAuth users
- **Quota:** 200 requests/minute, 100 requests/day (free tier ending 2026-04-15)
- **Best for:** General queries, always available as fallback for Qwen OAuth users
- **Auto-registration:** If you're using Qwen OAuth, DashScope is automatically added to your provider list even if you don't configure it explicitly
- **Cost:** Free (requires Qwen OAuth credentials)
- **Authentication:** Requires Qwen OAuth credentials
- **Configuration:** Must be explicitly configured in `settings.json` web search providers (auto-injection for Qwen OAuth users was removed when the free tier was discontinued on 2026-04-15)
- **Quota:** 200 requests/minute, 100 requests/day
- **Best for:** General queries when you have Qwen OAuth credentials

### Tavily

Expand Down
12 changes: 7 additions & 5 deletions docs/users/configuration/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

Qwen Code supports three authentication methods. Pick the one that matches how you want to run the CLI:

- **Qwen OAuth**: sign in with your `qwen.ai` account in a browser. Free with a daily quota.
- **Qwen OAuth**: sign in with your `qwen.ai` account in a browser. **Free tier discontinued on 2026-04-15** — switch to another method.
- **Alibaba Cloud Coding Plan**: use an API key from Alibaba Cloud. Paid subscription with diverse model options and higher quotas.
- **API Key**: bring your own API key. Flexible to your own needs — supports OpenAI, Anthropic, Gemini, and other compatible endpoints.

## Option 1: Qwen OAuth (Free)
## Option 1: Qwen OAuth (Discontinued)

Use this if you want the simplest setup and you're using Qwen models.
> [!warning]
>
> The Qwen OAuth free tier was discontinued on 2026-04-15. Existing cached tokens may continue working briefly, but new requests will be rejected. Please switch to Alibaba Cloud Coding Plan, [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or another provider. Run `qwen auth` to configure.

- **How it works**: on first start, Qwen Code opens a browser login page. After you finish, credentials are cached locally so you usually won't need to log in again.
- **Requirements**: a `qwen.ai` account + internet access (at least for the first login).
- **Benefits**: no API key management, automatic credential refresh.
- **Cost & quota**: free, with a quota of **60 requests/minute** and **100 requests/day**. Note: the free tier will be discontinued on 2026-04-15. After that, consider switching to [OpenRouter](https://openrouter.ai), [Fireworks AI](https://app.fireworks.ai), or [Alibaba Cloud ModelStudio](https://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2840914_2&modelId=qwen3.6-plus) — run `qwen auth` to configure your new provider.
- **Cost & quota**: the free tier has been discontinued as of 2026-04-15.

Start the CLI and follow the browser flow:

Expand Down Expand Up @@ -327,8 +329,8 @@ You'll see a selector with arrow-key navigation:
```
Select authentication method:

> Qwen OAuth - Free · 100 requests/day · Ending 2026-04-15
Alibaba Cloud Coding Plan - Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models
Qwen OAuth - Discontinued — switch to Coding Plan or API Key

(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/users/support/tos-privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Qwen Code is an open-source AI coding assistant tool maintained by the Qwen Code

Qwen Code supports three authentication methods to access AI models. Your authentication method determines which terms of service and privacy policies apply to your usage:

1. **Qwen OAuth** — Log in with your qwen.ai account (free daily quota, ending 2026-04-15)
1. **Qwen OAuth** — Log in with your qwen.ai account (free tier discontinued 2026-04-15)
2. **Alibaba Cloud Coding Plan** — Use an API key from Alibaba Cloud
3. **API Key** — Bring your own API key

Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/acp-integration/authMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export function buildAuthMethods(): AuthMethod[] {
{
id: AuthType.QWEN_OAUTH,
name: 'Qwen OAuth',
description:
'OAuth authentication for Qwen models with free daily requests (ending 2026-04-15)',
description: 'Qwen OAuth (free tier discontinued 2026-04-15)',
_meta: {
type: 'terminal',
args: ['--auth-type=qwen-oauth'],
Expand Down
33 changes: 22 additions & 11 deletions packages/cli/src/commands/auth/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,28 +367,36 @@ async function promptForKey(): Promise<string> {
export async function runInteractiveAuth() {
const selector = new InteractiveSelector(
[
{
value: 'qwen-oauth' as const,
label: t('Qwen OAuth'),
description: t('Free · 100 requests/day · Ending 2026-04-15'),
},
{
value: 'coding-plan' as const,
label: t('Alibaba Cloud Coding Plan'),
description: t(
'Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models',
),
},
{
value: 'qwen-oauth' as const,
label: t('Qwen OAuth'),
description: t('Discontinued — switch to Coding Plan or API Key'),
},
],
t('Select authentication method:'),
);

const choice = await selector.select();
let choice = await selector.select();

// If user selects discontinued Qwen OAuth, warn and re-prompt
while (choice === 'qwen-oauth') {
writeStdoutLine(
t(
'\n⚠ Qwen OAuth free tier was discontinued on 2026-04-15. Please select another option.\n',
),
);
choice = await selector.select();
}

if (choice === 'coding-plan') {
await handleQwenAuth('coding-plan', {});
} else {
await handleQwenAuth('qwen-oauth', {});
}
}

Expand Down Expand Up @@ -428,9 +436,12 @@ export async function showAuthStatus(): Promise<void> {
// Display status based on auth type
if (selectedType === AuthType.QWEN_OAUTH) {
writeStdoutLine(t('✓ Authentication Method: Qwen OAuth'));
writeStdoutLine(t(' Type: Free tier (ending 2026-04-15)'));
writeStdoutLine(t(' Limit: 100 requests/day'));
writeStdoutLine(t(' Models: Qwen latest models\n'));
writeStdoutLine(t(' Type: Free tier (discontinued 2026-04-15)'));
writeStdoutLine(t(' Limit: No longer available'));
writeStdoutLine(t(' Models: Qwen latest models'));
writeStdoutLine(
t('\n ⚠ Run /auth to switch to Coding Plan or another provider.\n'),
);
} else if (selectedType === AuthType.USE_OPENAI) {
// Check for Coding Plan configuration
const codingPlanRegion = mergedSettings.codingPlan?.region;
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/auth/status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ describe('showAuthStatus', () => {
expect.stringContaining('Qwen OAuth'),
);
expect(writeStdoutLine).toHaveBeenCalledWith(
expect.stringContaining('Free tier (ending 2026-04-15)'),
expect.stringContaining('Free tier (discontinued 2026-04-15)'),
);
expect(writeStdoutLine).toHaveBeenCalledWith(
expect.stringContaining('100 requests/day'),
expect.stringContaining('No longer available'),
);
expect(process.exit).toHaveBeenCalledWith(0);
});
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/config/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ describe('validateAuthMethod', () => {
expect(result).toContain('GEMINI_API_KEY_ALTERED');
});

it('should return null for QWEN_OAUTH', () => {
expect(validateAuthMethod(AuthType.QWEN_OAUTH)).toBeNull();
it('should return an error for QWEN_OAUTH (free tier discontinued)', () => {
const result = validateAuthMethod(AuthType.QWEN_OAUTH);
expect(result).toContain('discontinued on 2026-04-15');
});

it('should return an error message for an invalid auth method', () => {
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/config/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ export function validateAuthMethod(
}

if (authMethod === AuthType.QWEN_OAUTH) {
// Qwen OAuth doesn't require any environment variables for basic setup
// The OAuth flow will handle authentication
return null;
// Qwen OAuth free tier was discontinued on 2026-04-15.
// Block new OAuth setups; existing cached tokens still work until server rejects them.
return t(
'Qwen OAuth free tier was discontinued on 2026-04-15. Run /auth to switch to Coding Plan, OpenRouter, Fireworks AI, or another provider.',
);
}

if (authMethod === AuthType.USE_ANTHROPIC) {
Expand Down
15 changes: 4 additions & 11 deletions packages/cli/src/config/webSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { AuthType } from '@qwen-code/qwen-code-core';
import type { WebSearchProviderConfig } from '@qwen-code/qwen-code-core';
import type { Settings } from './settings.js';

Expand Down Expand Up @@ -40,10 +39,8 @@ export interface WebSearchConfig {
export function buildWebSearchConfig(
argv: WebSearchCliArgs,
settings: Settings,
authType?: string,
_authType?: string,
): WebSearchConfig | undefined {
const isQwenOAuth = authType === AuthType.QWEN_OAUTH;

// Step 1: Collect providers from settings or command line/env
let providers: WebSearchProviderConfig[] = [];
let userDefault: string | undefined;
Expand Down Expand Up @@ -77,13 +74,9 @@ export function buildWebSearchConfig(
}
}

// Step 2: Ensure dashscope is available for qwen-oauth users
if (isQwenOAuth) {
const hasDashscope = providers.some((p) => p.type === 'dashscope');
if (!hasDashscope) {
providers.push({ type: 'dashscope' } as WebSearchProviderConfig);
}
}
// Step 2: DashScope auto-injection for qwen-oauth was removed when the
// free tier was discontinued on 2026-04-15. Users who explicitly configure
// a dashscope provider in settings.json still get it (handled in Step 1).

// Step 3: If no providers available, return undefined
if (providers.length === 0) {
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/gemini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import {
AuthType,
InputFormat,
isDebugLoggingDegraded,
logUserPrompt,
Expand Down Expand Up @@ -436,6 +437,12 @@ export async function main() {
})),
...getSettingsWarnings(settings),
...config.getWarnings(),
...(config.getModelsConfig().getCurrentAuthType() ===
AuthType.QWEN_OAUTH
? [
'Qwen OAuth free tier was discontinued on 2026-04-15. Run /auth to switch to Coding Plan or another provider.',
]
: []),
]),
];

Expand Down
24 changes: 15 additions & 9 deletions packages/cli/src/i18n/locales/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,10 +1245,14 @@ export default {
'Terms of Services and Privacy Notice':
'Nutzungsbedingungen und Datenschutzhinweis',
'Qwen OAuth': 'Qwen OAuth',
'Free \u00B7 100 requests/day \u00B7 Ending 2026-04-15':
'Kostenlos \u00B7 100 Anfragen/Tag \u00B7 Endet am 2026-04-15',
'Login with QwenChat account to use daily free quota.':
'Melden Sie sich mit Ihrem QwenChat-Konto an, um das tägliche kostenlose Kontingent zu nutzen.',
'Discontinued — switch to Coding Plan or API Key':
'Eingestellt — wechseln Sie zu Coding Plan oder API Key',
'Qwen OAuth free tier was discontinued on 2026-04-15. Run /auth to switch provider.':
'Das kostenlose Qwen OAuth-Kontingent wurde am 2026-04-15 eingestellt. Führen Sie /auth aus, um den Anbieter zu wechseln.',
'Qwen OAuth free tier was discontinued on 2026-04-15. Please select Coding Plan or API Key instead.':
'Das kostenlose Qwen OAuth-Kontingent wurde am 2026-04-15 eingestellt. Bitte wählen Sie Coding Plan oder API Key.',
'\n⚠ Qwen OAuth free tier was discontinued on 2026-04-15. Please select another option.\n':
'\n⚠ Das kostenlose Qwen OAuth-Kontingent wurde am 2026-04-15 eingestellt. Bitte wählen Sie eine andere Option.\n',
'Paid \u00B7 Up to 6,000 requests/5 hrs \u00B7 All Alibaba Cloud Coding Plan Models':
'Kostenpflichtig \u00B7 Bis zu 6.000 Anfragen/5 Std. \u00B7 Alle Alibaba Cloud Coding Plan Modelle',
'Alibaba Cloud Coding Plan': 'Alibaba Cloud Coding Plan',
Expand Down Expand Up @@ -1948,18 +1952,20 @@ export default {
'⚠️ Keine Authentifizierungsmethode konfiguriert.\n',
'Run one of the following commands to get started:\n':
'Führen Sie einen der folgenden Befehle aus, um zu beginnen:\n',
' qwen auth qwen-oauth - Authenticate with Qwen OAuth (free tier)':
' qwen auth qwen-oauth - Mit Qwen OAuth authentifizieren (kostenlos)',
' qwen auth qwen-oauth - Authenticate with Qwen OAuth (discontinued)':
' qwen auth qwen-oauth - Mit Qwen OAuth authentifizieren (eingestellt)',
' qwen auth coding-plan - Authenticate with Alibaba Cloud Coding Plan\n':
' qwen auth coding-plan - Mit Alibaba Cloud Coding Plan authentifizieren\n',
'Or simply run:': 'Oder einfach ausführen:',
' qwen auth - Interactive authentication setup\n':
' qwen auth - Interaktive Authentifizierungseinrichtung\n',
'✓ Authentication Method: Qwen OAuth':
'✓ Authentifizierungsmethode: Qwen OAuth',
' Type: Free tier (ending 2026-04-15)':
' Typ: Kostenlos (endet am 2026-04-15)',
' Limit: 100 requests/day': ' Limit: 100 Anfragen/Tag',
' Type: Free tier (discontinued 2026-04-15)':
' Typ: Kostenloses Kontingent (eingestellt 2026-04-15)',
' Limit: No longer available': ' Limit: Nicht mehr verfügbar',
'Qwen OAuth free tier was discontinued on 2026-04-15. Run /auth to switch to Coding Plan, OpenRouter, Fireworks AI, or another provider.':
'Das kostenlose Qwen OAuth-Kontingent wurde am 2026-04-15 eingestellt. Führen Sie /auth aus, um zu Coding Plan, OpenRouter, Fireworks AI oder einem anderen Anbieter zu wechseln.',
' Models: Qwen latest models\n': ' Modelle: Qwen neueste Modelle\n',
'✓ Authentication Method: Alibaba Cloud Coding Plan':
'✓ Authentifizierungsmethode: Alibaba Cloud Coding Plan',
Expand Down
Loading
Loading