CC Switch local proxy failed while handling Codex endpoint /responses. Provider:...
错误信息
CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-flash; upstream_status: HTTP 400; cause: The `reasoning_content` in the thinking mode must be passed back to the API.
model_provider = "custom"
model = "deepseek-flash"
model_reasoning_effort = "high"
disable_response_storage = true
model_catalog_json = "cc-switch-model-catalog.json"
[model_providers]
[model_providers.custom]
name = "deepseek"
base_url = "https://api.deepseek.com"
wire_api = "responses"
requires_openai_auth = true
这是我的配置文件,帮我修改
AI 解决方案
原文:The `reasoning_content` in the thinking mode must be passed back to the API.
译文:在思考模式下,`reasoning_content` 必须回传给 API。
🎯 错误原因
当使用
reasoning_effort 开启思考模式时,DeepSeek API 要求将中途生成的 reasoning_content(思维链内容)完整回传。当前配置的 wire_api 可能未正确处理该字段,或配置项未满足该要求,导致 HTTP 400 错误。💡 修复方案
需要确保使用 OpenAI 兼容的
chat API 并正确处理推理内容。修改配置如下:model_provider = "custom"
model = "deepseek-flash"
model_reasoning_effort = "high"
disable_response_storage = true
model_catalog_json = "cc-switch-model-catalog.json"
[model_providers]
[model_providers.custom]
name = "deepseek"
base_url = "https://api.deepseek.com"
wire_api = "chat"
requires_openai_auth = true
💡 关键修改:将wire_api从responses改为chat,确保正确处理推理字段。
🛡️ 预防措施
reasoning_content)。