[openai_api_compatible] Error: 'model'
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
0.15.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I succeeded when configuring openai_api_compatible, but I get an error when using it,Access Alibaba to the PAI platform and deploy DeepSeek-R1-Distill-Qwen-7B,Select this model during the chat and return empty
calling dify API: { "code": "completion_request_error", "message": "[openai_api_compatible] Error: 'model'", "status": 400 }
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@Capricorn0010 Hello there! I'm here to assist you with any bugs, questions, or contributions you may have. I can help solve issues while waiting for a human maintainer.
The error message "completion_request_error" with the code 400 indicates that there is an issue with the completion request in Dify's API, specifically related to the 'model' parameter [1]. This could be due to a few reasons:
-
Model Configuration: Ensure that the model "DeepSeek-R1-Distill-Qwen-7B" is correctly configured in the Dify platform. Verify that the model is properly deployed and the SageMaker endpoint is correctly set up in the Dify management panel [2].
-
Model Selection: Double-check that the model is enabled in the system model provider settings. If a model is disabled, it can lead to errors or non-functionality [3].
-
API Compatibility: Since you are using the 'openai_api_compatible' feature, ensure that the integration is correctly set up with the necessary plugins (
oaicompat_dify_modelandoaicompat_dify_app) as planned for version 1.0.0 [4].
Review these areas to troubleshoot the issue further. If the problem persists, consider checking the detailed logging and debugging capabilities in Dify to gain more insights into the error [5].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other