Skip to content

Commit cbfdc7b

Browse files
committed
feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff)
The Qwen OAuth free tier has reached its end-of-life date. This updates all client-side messaging, blocks new OAuth signups, and guides existing users to alternative providers.
1 parent ae424e0 commit cbfdc7b

File tree

25 files changed

+195
-127
lines changed

25 files changed

+195
-127
lines changed

.qwen/skills/qwen-code-claw/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Full reference: https://raw.githubusercontent.com/QwenLM/qwen-code/refs/heads/ma
182182

183183
### Authentication
184184

185-
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.
185+
Supports Alibaba Cloud Coding Plan, OpenAI-compatible API keys, and Qwen OAuth (free tier discontinued 2026-04-15).
186186

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

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
## 🎉 News
2222

23-
- **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.
23+
- **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.
24+
25+
- **2026-04-13**: Qwen OAuth free tier policy update: daily quota adjusted to 100 requests/day (from 1,000).
2426

2527
- **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.
2628

@@ -30,7 +32,7 @@
3032

3133
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.
3234

33-
- **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).
35+
- **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.
3436
- **Open-source, co-evolving**: both the framework and the Qwen3-Coder model are open-source—and they ship and evolve together.
3537
- **Agentic workflow, feature-rich**: rich built-in tools (Skills, SubAgents) for a full agentic workflow and a Claude Code-like experience.
3638
- **Terminal-first, IDE-friendly**: built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.

docs/developers/tools/web-search.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Use `web_search` to perform a web search and get information from the internet.
88

99
### Supported Providers
1010

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

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

133133
### DashScope (Official)
134134

135-
- **Cost:** Free
136-
- **Authentication:** Automatically available when using Qwen OAuth authentication
137-
- **Configuration:** No API key required, automatically added to provider list for Qwen OAuth users
138-
- **Quota:** 200 requests/minute, 100 requests/day (free tier ending 2026-04-15)
139-
- **Best for:** General queries, always available as fallback for Qwen OAuth users
140-
- **Auto-registration:** If you're using Qwen OAuth, DashScope is automatically added to your provider list even if you don't configure it explicitly
135+
- **Cost:** Free (requires Qwen OAuth credentials)
136+
- **Authentication:** Requires Qwen OAuth credentials
137+
- **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)
138+
- **Quota:** 200 requests/minute, 100 requests/day
139+
- **Best for:** General queries when you have Qwen OAuth credentials
141140

142141
### Tavily
143142

docs/users/configuration/auth.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

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

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

9-
## Option 1: Qwen OAuth (Free)
9+
## Option 1: Qwen OAuth (Discontinued)
1010

11-
Use this if you want the simplest setup and you're using Qwen models.
11+
> [!warning]
12+
>
13+
> 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.
1214
1315
- **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.
1416
- **Requirements**: a `qwen.ai` account + internet access (at least for the first login).
1517
- **Benefits**: no API key management, automatic credential refresh.
16-
- **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.
18+
- **Cost & quota**: the free tier has been discontinued as of 2026-04-15.
1719

1820
Start the CLI and follow the browser flow:
1921

@@ -327,8 +329,8 @@ You'll see a selector with arrow-key navigation:
327329
```
328330
Select authentication method:
329331
330-
> Qwen OAuth - Free · 100 requests/day · Ending 2026-04-15
331332
Alibaba Cloud Coding Plan - Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models
333+
Qwen OAuth - Discontinued — switch to Coding Plan or API Key
332334
333335
(Use ↑ ↓ arrows to navigate, Enter to select, Ctrl+C to exit)
334336
```

docs/users/support/tos-privacy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Qwen Code is an open-source AI coding assistant tool maintained by the Qwen Code
66

77
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:
88

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

packages/cli/src/acp-integration/authMethods.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export function buildAuthMethods(): AuthMethod[] {
2121
{
2222
id: AuthType.QWEN_OAUTH,
2323
name: 'Qwen OAuth',
24-
description:
25-
'OAuth authentication for Qwen models with free daily requests (ending 2026-04-15)',
24+
description: 'Qwen OAuth (free tier discontinued 2026-04-15)',
2625
_meta: {
2726
type: 'terminal',
2827
args: ['--auth-type=qwen-oauth'],

packages/cli/src/commands/auth/handler.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -367,28 +367,36 @@ async function promptForKey(): Promise<string> {
367367
export async function runInteractiveAuth() {
368368
const selector = new InteractiveSelector(
369369
[
370-
{
371-
value: 'qwen-oauth' as const,
372-
label: t('Qwen OAuth'),
373-
description: t('Free · 100 requests/day · Ending 2026-04-15'),
374-
},
375370
{
376371
value: 'coding-plan' as const,
377372
label: t('Alibaba Cloud Coding Plan'),
378373
description: t(
379374
'Paid · Up to 6,000 requests/5 hrs · All Alibaba Cloud Coding Plan Models',
380375
),
381376
},
377+
{
378+
value: 'qwen-oauth' as const,
379+
label: t('Qwen OAuth'),
380+
description: t('Discontinued — switch to Coding Plan or API Key'),
381+
},
382382
],
383383
t('Select authentication method:'),
384384
);
385385

386-
const choice = await selector.select();
386+
let choice = await selector.select();
387+
388+
// If user selects discontinued Qwen OAuth, warn and re-prompt
389+
while (choice === 'qwen-oauth') {
390+
writeStdoutLine(
391+
t(
392+
'\n⚠ Qwen OAuth free tier was discontinued on 2026-04-15. Please select another option.\n',
393+
),
394+
);
395+
choice = await selector.select();
396+
}
387397

388398
if (choice === 'coding-plan') {
389399
await handleQwenAuth('coding-plan', {});
390-
} else {
391-
await handleQwenAuth('qwen-oauth', {});
392400
}
393401
}
394402

@@ -428,9 +436,12 @@ export async function showAuthStatus(): Promise<void> {
428436
// Display status based on auth type
429437
if (selectedType === AuthType.QWEN_OAUTH) {
430438
writeStdoutLine(t('✓ Authentication Method: Qwen OAuth'));
431-
writeStdoutLine(t(' Type: Free tier (ending 2026-04-15)'));
432-
writeStdoutLine(t(' Limit: 100 requests/day'));
433-
writeStdoutLine(t(' Models: Qwen latest models\n'));
439+
writeStdoutLine(t(' Type: Free tier (discontinued 2026-04-15)'));
440+
writeStdoutLine(t(' Limit: No longer available'));
441+
writeStdoutLine(t(' Models: Qwen latest models'));
442+
writeStdoutLine(
443+
t('\n ⚠ Run /auth to switch to Coding Plan or another provider.\n'),
444+
);
434445
} else if (selectedType === AuthType.USE_OPENAI) {
435446
// Check for Coding Plan configuration
436447
const codingPlanRegion = mergedSettings.codingPlan?.region;

packages/cli/src/commands/auth/status.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ describe('showAuthStatus', () => {
8282
expect.stringContaining('Qwen OAuth'),
8383
);
8484
expect(writeStdoutLine).toHaveBeenCalledWith(
85-
expect.stringContaining('Free tier (ending 2026-04-15)'),
85+
expect.stringContaining('Free tier (discontinued 2026-04-15)'),
8686
);
8787
expect(writeStdoutLine).toHaveBeenCalledWith(
88-
expect.stringContaining('100 requests/day'),
88+
expect.stringContaining('No longer available'),
8989
);
9090
expect(process.exit).toHaveBeenCalledWith(0);
9191
});

packages/cli/src/config/auth.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ describe('validateAuthMethod', () => {
107107
expect(result).toContain('GEMINI_API_KEY_ALTERED');
108108
});
109109

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

114115
it('should return an error message for an invalid auth method', () => {

packages/cli/src/config/auth.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ export function validateAuthMethod(
189189
}
190190

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

197199
if (authMethod === AuthType.USE_ANTHROPIC) {

0 commit comments

Comments
 (0)