fix(codex): merge v31 Qwen streaming and reasoning root fixes - #10
Merged
BigStrongSun merged 16 commits intoAug 15, 2026
Conversation
Root cause: model identifiers such as qwen3.8 were copied into nickname_candidates unchanged. Codex only permits ASCII letters, digits, spaces, hyphens, and underscores, so it rejected the entire generated role and later reported unknown agent_type. Normalize unsupported punctuation to spaces, collapse whitespace, provide a safe fallback, and cover the qwen3.8 role TOML with a regression test. Verified all 85 codex_subagent_profiles tests and cargo formatting. 本次提交由BigStrongsSun完成
Bump the package, Rust crate, lockfile, and Tauri application versions together so the Qwen V2 nickname fix can be deployed and distinguished from 3.19.1-28. Add Chinese release notes covering root cause, behavior change, and regression validation. 本次提交由BigStrongsSun完成
Do not special-case qwen3.8. Centralize the exact Codex nickname grammar, derive automatic nicknames from the full model identifier, preserve legal hyphens and underscores, normalize every unsupported character, and retain a safe fallback for identifiers without usable ASCII. Reuse the same predicate for explicit nickname validation. Add table-driven coverage for dotted, slashed, colon-delimited, Unicode, and symbol-only identifiers plus an end-to-end invariant that every generated role nickname satisfies Codex parsing rules. Verified 87 profile tests with zero failures. 本次提交由BigStrongsSun完成
Bump all application version sources together and document the generalized Sub-Agent V2 nickname normalization, shared grammar validation, model identifier coverage, and 87-test acceptance result. 本次提交由BigStrongsSun完成
RED: a streaming Codex Responses request with tool_choice=auto and globally advertised hosted tools must not be converted into an upstream non-streaming request. Explicit web_search/image_generation selection and genuinely non-streaming requests retain the buffered hosted loop. Compilation fails because the transport policy helper does not yet exist. 本次提交由BigStrongsSun完成
Do not let globally advertised OpenAI hosted tools force every Responses-to-Chat request into stream=false. The transport policy now uses the actual client streaming semantics, including Accept headers, and omits hosted-only definitions from streaming tool_choice=auto projections while preserving ordinary client tools. Explicit web_search/image_generation choices and genuinely non-streaming requests retain the existing bounded hosted loop. This removes the Qwen long-context blank-thinking regression without forcing tool calls, guessing from user text, or disabling Matrix MCP/client tools. Validation: new RED/GREEN policy tests, existing hosted loop tests, rustfmt, and git diff checks passed. 本次提交由BigStrongsSun完成
Bump all application and Rust version sources from v30 to v31. Add Chinese release notes and project memory documenting the two independent Qwen3.8 root causes, the exact streaming policy boundary, remote Tool Guard deployment evidence, regression totals, required live acceptance, and rollback ownership. UTF-8 strict decoding and no-BOM checks passed for all changed text files; rustfmt and git diff checks passed. 本次提交由BigStrongsSun完成
Launch the existing audited CCSwitchMulti installer transaction in a hidden independent PowerShell process with exact current/target versions and hashes, config backup, port ownership, health gate, and automatic rollback. Keeping arguments in a UTF-8 script avoids cross-shell quoting hazards and ensures the current Codex route is never left stopped on launcher failure. 本次提交由BigStrongsSun完成
Send a real Codex-shaped Responses request through installed port 15721 with stream=true, tool_choice=auto, one hosted web_search tool, and one ordinary client function. Require SSE content type, response.completed, the expected final marker, and report time to first event so router logs can prove upstream streaming remained enabled. 本次提交由BigStrongsSun完成
Record the v31 NSIS build marker and installer hash, successful independent install transaction and rollback status, installed PID/version/hash/health, real Qwen SSE timing and event count, exact router trace proving streaming=true/upstream_stream=true, and the build-version snapshot race resolved by a SkipBuild re-export. UTF-8 strict decode and no-BOM checks passed. 本次提交由BigStrongsSun完成
Extend installed acceptance with a second Qwen request that still advertises hosted web_search but explicitly requires the ordinary report_marker function. Require streamed function-call argument completion, the correct tool name, and exact marker to prove the auto-stream policy removes only hosted-only definitions and preserves agent tools. 本次提交由BigStrongsSun完成
Add the installed report_marker canary and exact router trace proving ordinary client tools remain available and stream their function-call arguments even when hosted web_search is globally advertised. 本次提交由BigStrongsSun完成
- builtin 能力清单增加 Kimi K3/K3-256K(low/high/max,default high) - reasoning 声明解析/校验失败改为打日志,不再静默清空 - 前端取消勾选档位时清理 effortMap 孤儿映射;保存时校验映射 target 合法 - 子智能体 V2 编译:Unknown 能力 + Fixed 策略放行;Fixed 档位宽校验 (effort_map 映射后合法则通过,保留显式档位由代理层运行时映射) - 投影档位收窄为模型真实能力(deepseek/k3 变 3 档),effort_value_mode 保留完整映射,代理端先映射后校验(窄显示 + 宽映射兜底) - 子智能体能力解析新增官方缓存来源(cc_switch_owned 时读 backup), luna/sol 等官方模型继承官方档位 - 修复 v28 死锁:未启用 profile 用 status.status 区分 Disabled/Unroutable, 开关与编辑按钮恢复可用 - 更新 5 处档位断言,新增 5 个测试;全量 2995 passed
providerWithFetchedModelCatalog rebuilds the provider model catalog from the stored catalog on every /models fetch, but the field spread list omitted `reasoning`. User-declared reasoning levels (K3, Qwen, etc.) were silently dropped on each refresh, so fixed reasoning levels disappeared after saving the MultiRouter or refreshing the catalog. Carry `reasoning` forward from the existing provider model so manual declarations survive catalog refreshes. The rest of the sync chain (rebuildPlanModelCatalog -> buildSyncedRouteModels -> applyRouteCapabilities) already spreads the model object and preserves it.
Apply the repository's current rustfmt output to the two cloud PR #9 commits after merging them into the v31 line. This is a mechanical formatting-only follow-up; combined Rust and frontend regressions passed before formatting. 本次提交由BigStrongsSun完成
Resolve equivalent cherry-pick conflicts after PR #9 merged into the cloud development base. Preserve both v28 release evidence and v31 Qwen streaming root-cause records, and retain the rustfmt-normalized reasoning implementation. Validated focused capability-effort tests, rustfmt, diff checks, and strict UTF-8 without BOM. 本次提交由BigStrongsSun完成
BigStrongSun
merged commit Aug 15, 2026
dcb6f0a
into
bigstrongsun/fix-wizard-provider-subagent-ux
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n\n- Fix the Qwen3.8 tool-loop stall at its source by migrating stale proxy environment state into the current Tool Guard configuration.\n- Remove the Hosted Tools path that unconditionally forced stream=false; preserve streaming for ordinary client tools and apply explicit hosted-tool policy only when hosted tools are present.\n- Add automatic streaming policy coverage, SSE/client-tool regression canaries, transactional v31 install/rollback tooling, and release documentation.\n- Include the reasoning-level fixes from PR #9, including preserving reasoning declarations during model-catalog refresh.\n\n## Root causes\n\n1. Legacy/stale proxy environment state could survive configuration migration and leave Qwen requests on an inconsistent Tool Guard path.\n2. Hosted Tools request preprocessing disabled upstream streaming unconditionally, even for requests containing only ordinary client-side tools.\n\n## Validation\n\n- Rust: 3006 passed, 0 failed, 2 ignored\n- Focused frontend: 179/179 passed\n- TypeScript typecheck: passed\n- rustfmt: passed\n- git diff --check: passed\n- Installed runtime: CCSwitchMulti 3.19.1-31, health HTTP 200\n- Live Qwen acceptance: streaming=true, upstream_stream=true, normal completion, and streamed ordinary tool calls preserved\n\n## Integration\n\nThis PR is based on the development branch after PR #9 was merged. It preserves the detailed v29-v31 root-fix history.