thinking 长度不足 Codex
Quick fix
新开 Codex 对话可暂时规避;原帖建议用过滤代理清除空或超短 thinking,官方修复尚未验证。
Symptom
Section titled “Symptom”{"error":{"message":"CC Switch local proxy failed while handling Codex endpoint /responses. Provider: 基元律动; model: deepseek-v4-flash-0731; upstream_status: HTTP 400; cause: messages.41.content.0.thinking 长度不足","type":"invalid_request_error","code":"cc_switch_upstream_error","param":null,"provider":"基元律动","model":"deepseek-v4-flash-0731","endpoint":"/responses","upstream_status":400}}该开放报告称,DeepSeek 系模型经 Anthropic 兼容接口流式输出时可能包含空或超短的 `thinking` 块。CC Switch 本地代理将其写入 Codex 会话历史后,下一次请求又将该记录回传;上游因 `thinking` 长度不足返回 HTTP 400。报告者验证称,同一会话重试无效,而新开对话可以规避。
同一 issue 的评论还报告了 `tool_call_id 长度不足` 的 HTTP 400:在 Responses 转 Chat 的字段重写不完整时,使用子 agent 或 agent 功能会触发该变体。该评论涉及不同版本、模型和上游格式,尚未提供可验证的统一修复。原帖为开放状态,不能视为已修复。
发生 `thinking 长度不足` 后,新开 Codex 对话以避开已写入会话历史的空 thinking 记录。
原帖提供的临时方案是使用 https://github.com/moyi-math/cc-switch-thinking-filter,在响应侧丢弃空 thinking,并在请求侧剥离历史残留;请按该项目说明操作。
CC Switch 代理本体的修复仍待确认;可在源 issue 中跟进过滤空或超短 thinking 块的处理状态。
Affected Versions
Section titled “Affected Versions”ToolCodex
Version未知
PlatformsWindows
Source Issues
Section titled “Source Issues”(暂无 FAQ)
api failed deserialize json body into按错误类型回退 Claude Code、升级 cc-switch、关闭本地代理或停止发送不支持的字段。The `content[].thinking` in the thinking该问题部分变体仍未修复:可将 CC Switch 升级到已包含 thinking 历史归一化修复的版本;Codex 经 DeepSeek 转发时需使用包含对应转换修复的版本。API Error: 400 Param Incorrect Claude Code升级 CC Switch 到 v3.16.2 或更新版本,修复 MiMo thinking mode 下 reasoning_content 未回传导致的 400 错误。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。