错误信息: The chatCompletion operation does not work with the specified model, gpt-5...
🚨 错误信息
错误名称: AI_APICallError
错误信息: The chatCompletion operation does not work with the specified model, gpt-5-pro. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://***/*** (request id: 20251019200938643325518GLpQR3OQ)
堆栈信息: AI_APICallError: The chatCompletion operation does not work with the specified model, gpt-5-pro. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://***/*** (request id: 20251019200938643325518GLpQR3OQ)
at file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/dist-BF36PYi7.js:4456:11
at async postToApi (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/dist-BF36PYi7.js:4352:24)
at async OpenAICompatibleChatLanguageModel.doStream (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:48824:48)
at async wrapStream (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:41689:31)
at async fn (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:39880:17)
at async file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37282:19
at async _retryWithExponentialBackoff (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37384:10)
at async streamStep (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:39848:108)
at async fn (file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:40127:5)
at async file:///C:/Program%20Files/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-8K9fs3H5.js:37282:19
错误原因: "[undefined]"
状态码: 400
请求路径: https://www.dmxapi.cn/v1/chat/completions
请求体: {
"model": "gpt-5-pro",
"user": "[undefined]",
"max_tokens": "[undefined]",
"temperature": "[undefined]",
"top_p": "[undefined]",
"frequency_penalty": "[undefined]",
"presence_penalty": "[undefined]",
"response_format": "[undefined]",
"stop": "[undefined]",
"seed": "[undefined]",
"reasoning_effort": "[undefined]",
"serviceTier": "[undefined]",
"messages": [
{
"role": "user",
"content": "您好"
}
],
"tools": "[undefined]",
"tool_choice": "[undefined]",
"stream": true,
"stream_options": {
"include_usage": true
}
}
响应首部: {
"cache-control": "no-cache",
"content-type": "text/event-stream",
"date": "Sun, 19 Oct 2025 12:09:40 GMT",
"server": "nginx",
"x-rixapi-request-id": "20251019200938643325518GLpQR3OQ"
}
响应内容: {
"error": {
"message": "The chatCompletion operation does not work with the specified model, gpt-5-pro. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://***/*** (request id: 20251019200938643325518GLpQR3OQ)",
"type": "openai_error",
"param": "",
"code": "OperationNotSupported"
}
}
数据: {
"error": {
"message": "The chatCompletion operation does not work with the specified model, gpt-5-pro. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://***/*** (request id: 20251019200938643325518GLpQR3OQ)",
"type": "openai_error",
"param": "",
"code": "OperationNotSupported"
}
}
🤖 AI解决方案
错误翻译
The chatCompletion operation does not work with the specified model, gpt-5-pro. Please choose different model and try again.
chatCompletion 操作不适用于指定的模型 gpt-5-pro。请选择其他模型再试。
原因分析
指定的模型 "gpt-5-pro" 不支持 chat/completions 接口。
解决方案
将请求中的 model 参数从 "gpt-5-pro" 修改为 DMXAPI 平台支持的模型。您可以参考 DMXAPI 官方文档(报错信息中提供的链接)来查找可用的模型列表。
例如,如果目标是使用一个通用的 GPT 模型,可以尝试将其修改为:
{
"model": "gpt-3.5-turbo", // 或其他可用模型,例如 "gpt-4o"
// ... 其他参数
}
预防措施
- 查阅文档:在调用 API 前,务必仔细查阅 DMXAPI 官方文档,了解当前支持的模型及其适用接口。
- 模型配置检查:在代码或配置文件中,对模型名称进行静态检查或动态校验,确保使用的是有效的模型标识。