status_code=400, Function tools with reasoning_effort are not supported for gpt-...
🚨 错误信息
status_code=400, Function tools with reasoning_effort are not supported for gpt-5.5 in /v1/chat/completions. Please use /v1/responses instead. (tid: 2026050213031933324505286951864
🤖 AI解决方案
报错分析报告
1.错误翻译
原文:Function tools with reasoning_effort are not supported for gpt-5.5 in /v1/chat/completions. Please use /v1/responses instead.
译文:gpt-5.5模型在/v1/chat/completions接口中不支持带reasoning_effort参数的函数工具,请改用/v1/responses接口。
2. 原因分析
/v1/chat/completions接口时,为gpt-5.5模型传递了含reasoning_effort的函数工具参数,该接口不支持此组合。 /v1/chat/completions)与模型(gpt-5.5)、参数(reasoning_effort)不兼容。3. 解决方案
改用
/v1/responses接口,示例代码(Python):python
import requestsurl = "https://api.dmxapi.com/v1/responses" # 替换为实际域名
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "gpt-5.5",
"input": "你的输入内容",
"tools": [{"type": "function", "function": {"name": "your_function", "parameters": {...}}}],
"reasoning_effort": "high" # 移至支持的接口
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
4. 预防措施
---
如需进一步分析其他报错,请提供具体错误信息。