400 {"error":{"type":"400","message":"Provider API error: Invalid JSON payload r...
🚨 错误信息
API Error: 400 {"error":{"type":"400","message":"Provider API error: Invalid JSON payload received. Unknown name \"propertyNames\" at 'tools[0].function_declarations[1].***.properties[0].value': Cannot find field.\nInvalid JSON payload received. Unknown name \"propertyNames\" at 'tools[0].function_declarations[1].***.properties[1].value': Cannot find field. (request id: 202605012046124605328663N1v6HRM)"},"type":"error"}
You can restart the conversation from an earlier message.
🤖 AI解决方案
报错分析报告
1.错误翻译
原文:Invalid JSON payload received. Unknown name "propertyNames" at 'tools[0].function_declarations[1].*.properties[0].value': Cannot find field.
译文:收到无效的JSON负载。在'tools[0].function_declarations[1].*.properties[0].value'处发现未知名称"propertyNames":无法找到该字段。原文:Invalid JSON payload received. Unknown name "propertyNames" at 'tools[0].function_declarations[1].*.properties[1].value': Cannot find field.
译文:收到无效的JSON负载。在'tools[0].function_declarations[1].*.properties[1].value'处发现未知名称"propertyNames":无法找到该字段。
2. 原因分析
propertyNames。 tools[0].function_declarations[1]对应的*.properties[0].value和properties[1].value路径下。3. 解决方案
移除JSON中未知的
propertyNames字段,确保负载符合API schema: json
{
"tools": [
{
"function_declarations": [
{},
{
"*": {
"properties": [
{ "value": {} }, // 移除propertyNames
{ "value": {} } // 移除propertyNames
]
}
}
]
}
]
}
4. 预防措施
推荐工具:Postman(内置Schema验证)、VS Code插件「JSON Schema Validator」。