[openai_api_compatible] Error: 'model' #8616

Closed
opened 2026-02-21 18:26:38 -05:00 by yindo · 2 comments
Owner

Originally created by @Capricorn0010 on GitHub (Feb 25, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • 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

Image

calling dify API:
{
"code": "completion_request_error",
"message": "[openai_api_compatible] Error: 'model'",
"status": 400
}

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Capricorn0010 on GitHub (Feb 25, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [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 <img width="649" alt="Image" src="https://github.com/user-attachments/assets/0499ab9f-5615-41e2-99ea-60fce1acc0ac" /> calling dify API: { "code": "completion_request_error", "message": "[openai_api_compatible] Error: 'model'", "status": 400 } ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:26:38 -05:00
yindo closed this issue 2026-02-21 18:26:38 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 25, 2025):

@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:

  1. 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].

  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].

  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_model and oaicompat_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

@dosubot[bot] commented on GitHub (Feb 25, 2025): <!-- Greeting --> @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. <!-- Answer --> 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 <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/controllers/service_api/app/error.py)</sup>. This could be due to a few reasons: 1. **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 <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/development/models-integration/aws-bedrock-deepseek.md)</sup>. 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 <sup>[[3]](https://github.com/langgenius/dify/issues/14095)</sup>. 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_model` and `oaicompat_dify_app`) as planned for version 1.0.0 <sup>[[4]](https://github.com/langgenius/dify/issues/14131)</sup>. 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 <sup>[[5]](https://github.com/langgenius/dify/blob/main/api/extensions/ext_logging.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9f31f5ae-c154-4cb5-a593-1324be5da341?feedback_type=other)</sup>
Author
Owner

@swit1983 commented on GitHub (Dec 11, 2025):

This error still persists. After configuring the model, streaming API calls do not report errors, but blocking calls do

@swit1983 commented on GitHub (Dec 11, 2025): This error still persists. After configuring the model, streaming API calls do not report errors, but blocking calls do
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8616