400 {"error":{"type":"invalid_request_error","message":"The `content[].thinking`...
错误信息
API Error: 400 {"error":{"type":"invalid_request_error","message":"The `content[].thinking` in the
thinking mode must be passed back to the API. (request id:
2026043017564199672769UcMvzGCr)"},"type":"error"}
AI 解决方案
报错分析报告
1.错误翻译
原文:The `content[].thinking` in the thinking mode must be passed back to the API.
译文:在思考模式下,`content[].thinking` 必须回传给API。
2. 原因分析
content[].thinking字段值回传至服务端。 content数组中,缺失thinking子字段(或该字段未被正确返回)。3. 解决方案
以Python requests为例,修复请求体需包含
content[].thinking:import requests
url = "YOUR_API_ENDPOINT"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
payload = {
"content": [
{
"type": "thinking", # 对应思考模式
"thinking": "此处填写原思考过程的内容" # 必须回传的核心字段
}
]
}
response = requests.post(url, json=payload, headers=headers)
4. 预防措施
content[].thinking),避免遗漏。 ---
请补充具体代码的报错场景,可进一步细化分析。