400 status_code=400, The `reasoning_content` in the thinking mode must be passed...
错误信息
API Error: 400 status_code=400, The `reasoning_content` in the thinking mode must be passed back to the API. (request id: 202607310127281212997178268d9d67EQvjrF0) (request id:
20260731012728052779873c14228f5L5ZjDEoM)
AI 解决方案
🔍 报错分析
1. 🌐 错误翻译
原文:API Error: 400 status_code=400, The `reasoning_content` in the thinking mode must be passed back to the API. (request id: 202607310127281212997178268d9d67EQvjrF0) (request id: 20260731012728052779873c14228f5L5ZjDEoM)
译文:API错误:400 状态码=400,在思考模式下,`reasoning_content` 必须回传给API。
2. 🎯 原因分析
reasoning_content 参数。reasoning_content(推理内容)字段随请求一起发送给服务端。3. 💡 解决方案
确保在API请求中包含
reasoning_content 字段:// 修复后的代码示例
const response = await fetch('https://api.example.com/v1/think', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
prompt: "你的推理内容或思考过程",
reasoning_content: "详细描述你的思考逻辑和推理过程", // 必须包含此字段
// 其他必需参数...
})
});
# 修复后的代码示例
import requests
response = requests.post('https://api.example.com/v1/think',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'prompt': "你的推理内容或思考过程",
'reasoning_content': "详细描述你的思考逻辑和推理过程", # 必须包含此字段
# 其他必需参数...
}
)