Repository navigation
fix: Claude 模型限制兼容回退,默认超时改为 1800 秒 - #18
Merged
Merged
Conversation
claude-sonnet-5-5 through CommandCode rejects thinking.type=disabled (asking for between_tools, which CommandCode's own validation rejects) and forced tool_choice (tool/any). The bridge now recognizes these upstream 400s on Messages-protocol models and retries once with the nearest accepted request: adaptive thinking at low effort, or tool_choice auto with the same tools. The change is logged in a new adjustments field and shown in the console request details; an accepted retry is remembered per model for the process and forgotten on restart or base_url change. Other errors are not retried. The default timeout_seconds rises from 600 to 1800 (grok-4.7 high effort took 658 s live). Instances with saved settings keep their stored value. commandcode_live.py: the thinking check uses a problem that needs reasoning, adds --thinking-off and --request-timeout, and records adjustments per request. cpa_round2.py emulates the sonnet-5-5 rejections through real CPA.
- Real upstream retest of the sonnet-5-5 fallbacks (via a JP egress; HK egress gets 403 for Claude models) - Record the exact upstream error texts; both match the existing rules - Bump to 0.2.14; hot-reload gate now upgrades from v0.2.13 - Deployment notes: saved timeout stays 600, Claude 403 egress hint
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.
修复 2026-11-08 付费真实验收中发现的问题(见
docs/VALIDATION.md)。改动
model(none):上游拒绝thinking.type=disabled并要求改用between_tools,而 CommandCode 的请求校验对所有模型都拒绝between_tools。插件识别这一 400 后,改用自适应思考加effort=low重试一次。tool_choice为tool/any时返回 400 "not supported"。插件改为auto重试一次,工具列表和disable_parallel_tool_use保持不变。adjustments字段,控制台请求详情新增「兼容调整」一行。base_url后清除。重试仍失败则不记住。timeout_seconds从 600 改为 1800:grok-4.7 实测用时 658 秒。已保存过设置的实例仍使用settings.json里的值,需要手动修改;未做自动迁移,避免覆盖用户有意设置的值。设置页说明已同步更新。tests/commandcode_live.py:effort=high。--thinking-off和--request-timeout两个参数。cpa_round2.py:模拟上游按 sonnet-5-5 的方式拒绝请求,经真实 CPA 宿主做端到端验证。本地验证
go test -race ./...(WSL Linux)、go vet、gofmt、Node 32 项、Prettier 均通过。test_cpamp_panel_validation.py6 项通过。尚未验证
真实上游复测需等额度重置(2026-11-08T08:30Z)后进行:用新 DLL 测试 sonnet-5-5 的
(none)和强制工具选择,并用修复后的验收脚本跑 haiku-5-5 和 sonnet-5-5。