Ryan (@RyanHZ) 在 困扰很久的CC出现400错误的问题应该是找到了 中发帖
用了ag反出来的api,总是突然出现400错误。原因是:“Multiple tools are supported only when they are all search tools.”
问了下AI(cc自己),回答是这样的:
这个错误非常明确:
“Multiple tools are supported only when they are all search tools.”
这是因为你的本地代理是转发到 Google Gemini API,而不是 Anthropic API。
Gemini API 对并行工具调用有限制 —— 只允许多个搜索工具同时调用,不支持 Claude Code 的多工具并行调用模式。
解决方案:
如果你想用 Gemini:这个限制是 Google API 的,无法绕过。Claude Code 设计时假设后端支持多工具并行。
切换到真正的 C...