❌ **AI 请求失败** API request failed: 400 Function tools with reasoning_effort are n...
错误信息
❌ **AI 请求失败**
API request failed: 400
Function tools with reasoning_effort are not supported for gpt-6-luna in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'. (request id: 20260928061100704509408ENC7drt9)
AI 解决方案
原文:Function tools with reasoning_effort are not supported for gpt-6-luna in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.
译文:在 /v1/chat/completions 接口中,gpt-6-luna 模型不支持同时使用 function tools 和 reasoning_effort 参数。若需使用 function tools,请改用 /v1/responses 接口,或将 reasoning_effort 设置为 'none'。
🎯 原因分析
请求
/v1/chat/completions 时,同时指定了 gpt-6-luna 模型、函数工具(function tools)和 reasoning_effort 参数。该模型在当前接口下不支持这种组合调用。💡 解决方案
方案一:将 reasoning_effort 设置为 "none",保留当前接口:
{
"model": "gpt-6-luna",
"messages": [{ "role": "user", "content": "你的请求内容" }],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "获取天气信息",
"parameters": {
"type": "object",
"properties": {
"city": { "type": "string" }
}
}
}
}
],
"reasoning_effort": "none"
}
方案二:改用 /v1/responses 接口,保留 reasoning_effort:
{
"model": "gpt-6-luna",
"input": [{ "role": "user", "content": "你的请求内容" }],
"reasoning": {
"effort": "medium"
}
}