From ec4c186955cb046fbc271b16ed999b1a411d7a92 Mon Sep 17 00:00:00 2001 From: weselow <598746@gmail.com> Date: Fri, 22 May 2026 15:42:43 +0400 Subject: [PATCH 1/2] chore(qwen-web): unify default model id to qwen3-max across catalogs (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this change, qwen-web had two different default model ids in different layers: - bridge/web-providers.ts: QWEN_WEB_DEFAULT_MODEL_ID = "qwen-max" (Qwen 2nd-gen flagship, deprecated on chat.qwen.ai) - providers/qwen-web-client-browser.ts: fallback "qwen3.5-plus" Plus the catalog entry in bridge declared "qwen3.5-plus" and "qwen3.5-turbo" — also stale. agents/model-catalog.ts and commands/onboard-web-auth.ts still keyed off "qwen-max" / "qwen3.5-plus" respectively. All four layers now use "qwen3-max" — the current flagship on chat.qwen.ai (Qwen3 series). The bridge catalog also gets a second entry "qwen3-plus" (cheaper sibling) to replace the dead "qwen3.5-turbo". Side effect: onboarding and discovery flow now report consistent ids; previously a user picking qwen-web during onboarding would get "qwen3.5-plus" matched against a bridge default of "qwen-max" — only worked because Qwen Web accepts unknown ids and routes via UI. Other web providers (chatgpt-web GPT-4, gemini-web gemini-pro, grok-2, kimi moonshot-v1-32k, glm-4-plus, doubao-seed-2.0) are also stale, but each has its own client/onboard/catalog chain. Out of scope for this PR — left for follow-up so each can be audited individually. askonce extension adapters (extensions/askonce/...) intentionally untouched — they're a separate consumer of these ids and may depend on the legacy values for their own routing. Co-authored-by: Claude Opus 4.7 (1M context) --- src/agents/model-catalog.ts | 2 +- src/commands/onboard-web-auth.ts | 4 ++-- src/zero-token/bridge/web-providers.ts | 10 +++++----- src/zero-token/providers/qwen-web-client-browser.ts | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/agents/model-catalog.ts b/src/agents/model-catalog.ts index 9aa3063f103..aa58e11abff 100644 --- a/src/agents/model-catalog.ts +++ b/src/agents/model-catalog.ts @@ -367,7 +367,7 @@ const KNOWN_WEB_MODEL_ENTRIES: ModelCatalogEntry[] = [ contextWindow: 128000, }, // qwen-web - { id: "qwen-max", name: "Qwen Web", provider: "qwen-web", contextWindow: 32000 }, + { id: "qwen3-max", name: "Qwen Web", provider: "qwen-web", contextWindow: 32000 }, // qwen-cn-web { id: "qwen-turbo", name: "Qwen CN Web", provider: "qwen-cn-web", contextWindow: 128000 }, // xiaomimo-web diff --git a/src/commands/onboard-web-auth.ts b/src/commands/onboard-web-auth.ts index 4be5581c7a5..875fa6b2453 100644 --- a/src/commands/onboard-web-auth.ts +++ b/src/commands/onboard-web-auth.ts @@ -92,7 +92,7 @@ async function addModelToWhitelist(providerId: string, modelIds: string[]): Prom "perplexity-web": "Perplexity Web", }, "qwen-web": { - "qwen3.5-plus": "Qwen Web", + "qwen3-max": "Qwen Web", }, "qwen-cn-web": { "qwen-turbo": "Qwen CN Web", @@ -285,7 +285,7 @@ export async function runOnboardWebAuth(): Promise { "grok-web": ["grok-2"], "kimi-web": ["moonshot-v1-32k"], "perplexity-web": ["perplexity-web"], - "qwen-web": ["qwen3.5-plus"], + "qwen-web": ["qwen3-max"], "qwen-cn-web": ["qwen-turbo"], "xiaomimo-web": ["xiaomimo-chat"], }; diff --git a/src/zero-token/bridge/web-providers.ts b/src/zero-token/bridge/web-providers.ts index 5c51781605e..32e05101247 100644 --- a/src/zero-token/bridge/web-providers.ts +++ b/src/zero-token/bridge/web-providers.ts @@ -53,7 +53,7 @@ const CHATGPT_WEB_DEFAULT_COST = { }; export const QWEN_WEB_BASE_URL = "https://chat.qwen.ai"; -export const QWEN_WEB_DEFAULT_MODEL_ID = "qwen-max"; +export const QWEN_WEB_DEFAULT_MODEL_ID = "qwen3-max"; const QWEN_WEB_DEFAULT_CONTEXT_WINDOW = 32000; const QWEN_WEB_DEFAULT_MAX_TOKENS = 8192; const QWEN_WEB_DEFAULT_COST = { @@ -357,8 +357,8 @@ export async function buildQwenWebProvider(_params?: { api: "qwen-web", models: [ { - id: "qwen3.5-plus", - name: "Qwen 3.5 Plus", + id: "qwen3-max", + name: "Qwen3 Max", reasoning: false, input: ["text"], cost: QWEN_WEB_DEFAULT_COST, @@ -366,8 +366,8 @@ export async function buildQwenWebProvider(_params?: { maxTokens: QWEN_WEB_DEFAULT_MAX_TOKENS, }, { - id: "qwen3.5-turbo", - name: "Qwen 3.5 Turbo", + id: "qwen3-plus", + name: "Qwen3 Plus", reasoning: false, input: ["text"], cost: QWEN_WEB_DEFAULT_COST, diff --git a/src/zero-token/providers/qwen-web-client-browser.ts b/src/zero-token/providers/qwen-web-client-browser.ts index 3241c98c6cc..41a00bf0dff 100644 --- a/src/zero-token/providers/qwen-web-client-browser.ts +++ b/src/zero-token/providers/qwen-web-client-browser.ts @@ -150,7 +150,7 @@ export class QwenWebClientBrowser { }): Promise> { const { page } = await this.ensureBrowser(); - const model = params.model || "qwen3.5-plus"; + const model = params.model || "qwen3-max"; console.log(`[Qwen Web Browser] Sending message`); console.log(`[Qwen Web Browser] Model: ${model}`); @@ -381,8 +381,8 @@ export class QwenWebClientBrowser { async discoverModels(): Promise { return [ { - id: "qwen3.5-plus", - name: "Qwen 3.5 Plus", + id: "qwen3-max", + name: "Qwen3 Max", api: "qwen-web", reasoning: false, input: ["text"], From 13c4075dd9444e9bac0708a4e254036bde89f190 Mon Sep 17 00:00:00 2001 From: weselow <598746@gmail.com> Date: Fri, 22 May 2026 17:08:37 +0400 Subject: [PATCH 2/2] refactor(qwen-web): reuse QWEN_WEB_DEFAULT_MODEL_ID in catalog entry Address CodeRabbit nitpick (b): web-providers.ts:360 hard-coded "qwen3-max" while QWEN_WEB_DEFAULT_MODEL_ID constant already exists on line 56. Replace literal with the existing constant in the catalog entry. --- src/zero-token/bridge/web-providers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zero-token/bridge/web-providers.ts b/src/zero-token/bridge/web-providers.ts index 32e05101247..fbcf628155c 100644 --- a/src/zero-token/bridge/web-providers.ts +++ b/src/zero-token/bridge/web-providers.ts @@ -357,7 +357,7 @@ export async function buildQwenWebProvider(_params?: { api: "qwen-web", models: [ { - id: "qwen3-max", + id: QWEN_WEB_DEFAULT_MODEL_ID, name: "Qwen3 Max", reasoning: false, input: ["text"],