mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
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:
parent
679446d1da
commit
f6271c61b6
27 changed files with 205 additions and 133 deletions
|
|
@ -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';
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue