unknown type: tool_search_call Codex 会话续聊 400
Quick fix
不要继续恢复含 tool_search_call 历史的线程;新建 Codex 线程后再使用 Responses 上游。
Symptom
Section titled “Symptom”{"error":{"message":"CC Switch local proxy failed while handling Codex endpoint /responses. Provider: 88api; model: deepseek-v4-pro; upstream_status: HTTP 400; cause: The parameter `***.type` specified in the request are not valid: `The parameter `***.type` specified in the request are not valid: unknown type: tool_search_call.`. Request id: 021790042768713252c31405ea13a3faffc9ac5530b150ca5eece","type":"BadRequest","code":"InvalidParameter","param":"input.type","provider":"88api","model":"deepseek-v4-pro","endpoint":"/responses","upstream_status":400}}Codex 的 tool_search 会把 tool_search_call 和 tool_search_output 写入会话历史。切换到原生 /v1/responses 上游后,CC Switch 本地代理会原样转发 input[];严格的第三方上游不认识 tool_search_call,因此在模型调用前以 HTTP 400 拒绝请求。历史 item 会在后续轮次重放,所以同一线程会持续失败,换模型无效。
这与 tools[] 声明转换或 Responses 到 chat/completions 的桥接问题不同。维护者关闭此 issue 时表示原因在客户端或 provider 一侧,CC Switch 无法在自身修复。
不要恢复包含 tool_search_call / tool_search_output 历史的线程;新建一个 Codex 线程继续使用。维护者指出 CC Switch 无法在自身修复此问题。
高级用户可以先备份 rollout JSONL,再编辑历史文件移除相关 item;issue 提醒这不是普通用户应承担的操作。
Affected Versions
Section titled “Affected Versions”ToolCodex
VersionCodex desktop app 26.915.31945;codex-cli 0.155.0-alpha.9.2
PlatformsmacOS
Source Issues
Section titled “Source Issues”(暂无 FAQ)
cc-switch 用量统计与 DeepSeek 官网不一致 / 不更新先升级到 v3.19.2 或更新版本,然后在「使用统计」页执行一次「重建 Codex 用量」,历史虚增或漏记的数据才会被修正。Codex 的 config.toml 被全量覆盖多数相关 issue 仍未解决;把 MCP、[desktop]、[projects] 等自定义段落写进 cc-switch 的「应用通用配置」或供应商模板,并升级到最新版,避免接管/重启重写 config.toml 时被丢弃。No tool output found for tool call此问题尚无已确认的官方修复;原帖提供了重排工具调用与输出的本地兼容层绕行方案,官方进展需关注主 issue。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。