Skip to content

fix(codex): merge v31 Qwen streaming and reasoning root fixes - #10

Merged
BigStrongSun merged 16 commits into
bigstrongsun/fix-wizard-provider-subagent-uxfrom
bigstrongsun/fix-qwen38-tool-loop-streaming-v30
Aug 15, 2026
Merged

fix(codex): merge v31 Qwen streaming and reasoning root fixes#10
BigStrongSun merged 16 commits into
bigstrongsun/fix-wizard-provider-subagent-uxfrom
bigstrongsun/fix-qwen38-tool-loop-streaming-v30

Conversation

@BigStrongSun

Copy link
Copy Markdown
Owner

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.

BigStrongSun and others added 15 commits August 15, 2026 20:03
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完成
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies backend frontend proxy labels Aug 15, 2026
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完成
@github-actions github-actions Bot removed the frontend label Aug 15, 2026
@BigStrongSun
BigStrongSun merged commit dcb6f0a into bigstrongsun/fix-wizard-provider-subagent-ux Aug 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend dependencies documentation Improvements or additions to documentation proxy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants