跳转到内容

unknown type: tool_search_call Codex 会话续聊 400

Quick fix

不要继续恢复含 tool_search_call 历史的线程;新建 Codex 线程后再使用 Responses 上游。

报错原文
{"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 无法在自身修复。

  1. 不要恢复包含 tool_search_call / tool_search_output 历史的线程;新建一个 Codex 线程继续使用。维护者指出 CC Switch 无法在自身修复此问题。

  2. 高级用户可以先备份 rollout JSONL,再编辑历史文件移除相关 item;issue 提醒这不是普通用户应承担的操作。

ToolCodex
VersionCodex desktop app 26.915.31945;codex-cli 0.155.0-alpha.9.2
PlatformsmacOS

(暂无 FAQ)

这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。