feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff) (#3291)

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

* fix(test): add getModelsConfig mock and update QWEN_OAUTH test expectations

- Add getModelsConfig() to Config mocks in gemini.test.tsx (3 failures)
- Update validateNonInterActiveAuth test to expect exit for QWEN_OAUTH
  since validateAuthMethod now returns an error for discontinued free tier
This commit is contained in:
tanzhenxin 2026-04-15 22:30:20 +08:00 committed by GitHub
parent 679446d1da
commit f6271c61b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 205 additions and 133 deletions

View file

@ -367,11 +367,6 @@ 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'),
@ -379,16 +374,29 @@ export async function runInteractiveAuth() {
'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', {});
}
}
@ -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;