\":{\"message\":\"This model is only supported in v1/responses and not in v1/cha...
🚨 错误信息
{ code: 985, message: "{\"error\":{\"message\":\"This model is only supported in v1/responses and not in v1/chat/completions. (tid: 2025101006260593753184461314102)\",\"type\":\"invalid_request_error\",\"param\":\"model\",\"code\":null}}" }))
🤖 AI解决方案
{
"error": {
"message": "该模型仅支持 v1/responses 接口,不支持 v1/chat/completions 接口。(tid: 2025101006260593753184461314102)",
"type": "invalid_request_error",
"param": "model",
"code": null
}
}
原因分析:
您使用的模型不适用于 v1/chat/completions 这个 API 端点。
解决方案:
请将您的 API 请求指向 v1/responses 端点,或者更换一个支持 v1/chat/completions 的模型。
预防措施:
- 在调用 API 前,仔细查阅 DMXAPI 官方文档,确认模型与 API 端点的兼容性。
- 在代码中增加对模型名称和 API 端点进行校验的逻辑,避免因参数错误导致请求失败。