fix: preserve reasoning effort for chat dialects#1472
Open
kogekiplay wants to merge 1 commit into
Open
Conversation
Owner
|
感谢贡献。这个 PR 的目标可以理解,但当前实现存在一个兼容性阻塞,暂不建议合并。
这些上游通常只支持自己的原生开关字段,严格接口可能因为未知的 这也与 CC-Switch 当前实现相反:CC-Switch 对 Kimi、GLM、Qwen、MiniMax、MiMo 和 SiliconFlow 明确使用 当前新增测试只验证 mock 收到了 建议改为供应商级能力控制:
修正这个边界后再考虑合并。 |
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
reasoning_effortvalue when Responses requests are converted to Chat Completions dialectsthinking,enable_thinking, orreasoning_split) unchangedxhighregression testsProblem
Codex sends the selected effort as
reasoning.effort. During Responses-to-Chat conversion, dialects such as GLM, Kimi, Qwen, and MiniMax reduced that value to a provider-specific boolean switch. The exact effort level was therefore lost, so downstream proxies and monitoring could observenone,auto, or no effort even when the client selectedxhigh.Compatibility
This adds
reasoning_effortalongside the existing native provider field. DeepSeek/OpenRouter handling and disabled reasoning values remain unchanged.Verification
cargo fmt --checkcargo test -p codex-plus-coreGIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false cargo test --workspacenpm run checknpm run vite:build