* feat(subscription): add development login, models and web search * feat(subscription): refine account flows and host integration Align desktop and VS Code subscription UI, add account logout and confirmed plan display, and map subscription thinking parameters. Remove simulation code and obsolete native authentication paths, consolidate design documentation, and cover cancellation and recovery boundaries. * fix(subscription): preserve request errors and remove unused compatibility * fix(subscription): refine command visibility and client logout flows * fix(subscription): simplify account actions and desktop sign-in feedback * docs(subscription): clarify sign-in and provider guidance * feat(subscription): support switching accounts across clients * fix(subscription): align account actions and open plans on demand * fix(subscription): restore model selection after logout Filter subscription-only commands consistently across terminal renderers, preserve model catalog error classification, and display the subscription authentication name consistently. * fix(subscription): unify status authentication labels across clients * fix(subscription): preserve provider connections across client logout Restore configured providers after subscription logout across CLI, Desktop, and VS Code. Keep unrelated connections and conversation history, synchronize model state silently, and return to an unconfigured chat when no provider remains. * fix(subscription): correct native client logout state * feat(subscription): enable sign-in without development mode * refactor(ui): 优化会员登录成功提示和界面交互体验 - 移除订阅欢迎提示相关状态和行为,简化 UI 状态管理 - 替换登录成功提示为四行摘要,包含邮箱、套餐、模型及常用命令提示 - 更新国际化文本,支持新的登录成功摘要内容 - 取消订阅模式下输入框下方的命令提示行,改为在登录成功摘要中展示 - 移除多余的测试用例,新增登录成功消息的单元测试校验 - 优化 AppHeader 组件,不再显示订阅启动重复提示 - 调整 Composer 组件逻辑,删除订阅提示相关副作用及渲染条件 - 修改历史消息显示组件以适应新的成功提示格式 * fix(subscription): enable Flash reasoning controls in shared UI * fix(subscription): prioritize authorized models and simplify login dialogs * fix(subscription): preserve gateway errors and request IDs * fix(subscription): synchronize account state across clients Preserve model selections after sign-out, synchronize account commands and model catalogs, and retain explicit browser sign-in flows across CLI, Web Shell, and VS Code. Cancel subscription background agents on logout and normalize expired refresh credentials without SDK error wrapping. * fix(subscription): reset default model on explicit sign-in Choose the default served model when explicitly signing in to Qwen Subscription, preferring Max over a previously saved Flash selection. Preserve normal startup behavior and other provider flows, and cover CLI and workspace activation with regression tests. * fix(vscode): refresh models after successful sign-in * fix(web-shell): hide account actions during automatic sign-in * fix(web-shell): align model details and auth keyboard navigation * docs(subscription): revert previous guide changes * fix(core): reuse subscription catalog for same-login model switches * docs(subscription): document Qwen membership sign-in * fix(subscription): unify quota notices and preserve provider switching Carry structured subscription quota details through chat and search errors for localized CLI, Desktop, and VS Code display. Keep other providers available when subscription discovery fails and refine sidebar account actions. * fix(web-shell): align Chinese subscription entry title with CLI * fix(subscription): open plans for saved non-member accounts * fix(web-shell): show subscription commands after desktop sign-in * fix(subscription): reauthorize explicit account sign-ins * fix(auth): add model switching hint to subscription success * docs(auth): list Qwen OAuth as the first option * docs(models): simplify subscription sign-in guidance * docs(models): remove legacy OAuth from supported auth types * docs(subscription): link membership references and remove obsolete allowance note * fix(subscription): preserve session until reauthorization succeeds * fix(subscription): use pre for browser authorization and plans * fix(subscription): use production endpoints * test(vscode): fix editor message test formatting * fix(subscription): preserve unauthenticated session startup * fix(cli): classify subscription auth during ACP preflight * fix(subscription): scope activation to the current project --------- Co-authored-by: luoyun <[email protected]>
3.7 KiB
Subscription MCP web search
Problem and scope
Subscription inference works, but built-in web_search only supports DashScope credentials. The subscription client sends MCP search requests to https://api.qwen.ai/api/v1/mcp/web_search, authenticated with the existing device access token. Integrate this service through the shared Core tool so CLI, VS Code and Desktop use the same behavior.
Protocol evidence
The staging SDK probe completed initialize (200), notifications/initialized (204), tools/list (200), and tools/call (200) at the staging MCP endpoint. Server qwen-web-search 0.1.0 exposes web_search: required query string, 1–500 characters; optional num (1–20, default 10), country, locale, and location. A public query returned text blocks containing numbered results, URLs and summaries; no structured sources or MCP session ID was returned. Evidence is in .qwen/e2e-tests/subscription-mcp-protocol.json.
Proposed implementation
Add a subscription variant to WebSearchBackendConfig and a small backend using the existing MCP SDK Streamable HTTP transport. Each search creates its own client, initializes, discovers web_search, calls it with query, and closes in finally. Preserve the service default result count. Join returned text blocks; extract only returned HTTP(S) links as unopened sources, leaving citation rules, output truncation, permissions and per-session usage limits to the existing tool. Reject queries above 500 characters and unsupported/error responses with safe error text.
For automatic search configuration, select this backend when the active auth type is qwen-subscription, without requiring DEV. Explicit disabling or explicit alternate search model/endpoint configuration retains its existing meaning. Synchronize registration after successful auth changes, including an already initialized session; preserve bare, safe, managed-runtime, subagent and permission boundaries.
Every HTTP request obtains its token through QwenSubscriptionSession.getAccessToken. Pin the exact URL, reject redirects, use existing runtime proxy/session fetch options, combine caller cancellation with a total search deadline, and refresh once on HTTP 401. Do not store tokens in settings or expose raw authentication/transport errors. Short-lived clients avoid shared MCP pool and cross-workspace transport state.
Boundaries and validation
Do not inject mcpServers, replace user MCP entries, change general MCP transport/pool behavior, add model-side search configuration knobs, or change DashScope search. A user-configured MCP server remains independent from the built-in tool.
Validate gate precedence and auth hot-switch registration, real SDK protocol/result mapping, dynamic tokens/401, cancellation/timeout, error redaction, exact destination/no redirects, and existing DashScope regressions. Finish with full build/typecheck/bundle and a real model-driven built-in search using the subscription model. Acceptance requires actual search results and source links, not merely a successful MCP connection. Native GUI behavior is claimed only if separately exercised. Verification passed: 1,090 focused tests, full build/typecheck/bundle, targeted lint/format and a real bundled CLI run. The member model discovered and invoked built-in search, received results, and cited the official repository. Search tools/call returned HTTP 200 with request ID 411b17f2-5d4e-406c-ba26-ad4918ff16a9. The background memory extractor separately returned HTTP 405 after the successful conversation; native GUI search was not exercised. Details are in the E2E report.