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: Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.
AI 解决方案
🔍 报错信息分析
1. 🌐 错误翻译
原文:CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-flash; upstream_status: HTTP 400; cause: Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.
译文:CC Switch 本地代理在处理 Codex 端点 /responses 时失败。提供商:DeepSeek;模型:deepseek-v4-flash;上游状态:HTTP 400;原因:函数 'codex_app__automation_update' 的 schema 无效:schema 必须是 'type: "object"' 的 JSON Schema,但实际得到的是 'type: null'。
2. 🎯 原因分析
codex_app__automation_update 函数时,传入的参数 schema 不符合 JSON Schema 规范type 字段的值被设置为 null,而要求必须是 "object"3. 💡 解决方案
需要检查并修正函数
codex_app__automation_update 的 schema 定义,确保 type 字段正确设置为 "object",示例修复如下:{
"type": "object",
"properties": {
// 这里填写函数实际需要的参数
"param1": {
"type": "string"
},
"param2": {
"type": "number"
}
// 其他参数...
},
"required": ["param1"] // 根据实际需求配置必选参数
}
修正步骤:
codex_app__automation_update 的 schema 定义代码type 字段从 null 改为 "object"properties 和 required 配置