Add OpenAI-API-compatible Rerank error 400 Client Error #92

Closed
opened 2026-02-16 10:18:02 -05:00 by yindo · 4 comments
Owner

Originally created by @fancywus on GitHub (Mar 19, 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

  1. download reranker model-bge-reranker-v2-m3 from modelscope
  2. dify version 0.15.3 use docker compose up this model
  3. page add reranker model setting -----> Add OpenAI-API-compatible Rerank error 400 Client Error

Image

✔️ Expected Behavior

add reranker model config success

Actual Behavior

Add OpenAI-API-compatible Rerank error 400 Client Error

Originally created by @fancywus on GitHub (Mar 19, 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 1. download reranker model-bge-reranker-v2-m3 from modelscope 2. dify version 0.15.3 use docker compose up this model 3. page add reranker model setting -----> Add OpenAI-API-compatible Rerank error 400 Client Error ![Image](https://github.com/user-attachments/assets/4e7096b5-47ef-4be9-9f72-d52d1ba76de6) ### ✔️ Expected Behavior add reranker model config success ### ❌ Actual Behavior Add OpenAI-API-compatible Rerank error 400 Client Error
yindo closed this issue 2026-02-16 10:18:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 19, 2025):

Hey @fancywus! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together!

To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the top_n parameter has been implemented in these versions, eliminating the need for manual code modification [1].

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 (Mar 19, 2025): <!-- Greeting --> Hey @fancywus! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together! <!-- Answer --> To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the `top_n` parameter has been implemented in these versions, eliminating the need for manual code modification <sup>[[1]](https://github.com/langgenius/dify/issues/14140)</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/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=other)</sup>
Author
Owner

@fancywus commented on GitHub (Mar 20, 2025):

Hey @fancywus! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together!

To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the top_n parameter has been implemented in these versions, eliminating the need for manual code modification [1].

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

Is there any other solution besides upgrading the version? As version 1.0 is a major upgrade, we are currently not considering exaggerating the version upgrade.

@fancywus commented on GitHub (Mar 20, 2025): > Hey [@fancywus](https://github.com/fancywus)! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together! > > To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the `top_n` parameter has been implemented in these versions, eliminating the need for manual code modification [[1]](https://github.com/langgenius/dify/issues/14140). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=other) Is there any other solution besides upgrading the version? As version 1.0 is a major upgrade, we are currently not considering exaggerating the version upgrade.
Author
Owner

@fancywus commented on GitHub (Mar 20, 2025):

Hey @fancywus! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together!

To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the top_n parameter has been implemented in these versions, eliminating the need for manual code modification [1].

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

I saw you mentioned elsewhere that the reranker.py file could solve the problem. I tried using the default settings but it still didn't work. After I made the modifications, I restarted the Docker service, but it still reported an error.
Image

@fancywus commented on GitHub (Mar 20, 2025): > Hey [@fancywus](https://github.com/fancywus)! I'm here to assist you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together! > > To resolve the 400 Client Error when adding an OpenAI-API-compatible reranker model in Dify version 0.15.3 using Docker, you should upgrade to Dify version 1.0.0 or higher. Additionally, ensure that the OpenAI-API-compatible plugin is version 0.0.6 or higher. The fix for the issue related to the `top_n` parameter has been implemented in these versions, eliminating the need for manual code modification [[1]](https://github.com/langgenius/dify/issues/14140). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a47494ac-03d5-4afc-a941-41c8b709c0ac?feedback_type=other) I saw you mentioned elsewhere that the reranker.py file could solve the problem. I tried using the default settings but it still didn't work. After I made the modifications, I restarted the Docker service, but it still reported an error. ![Image](https://github.com/user-attachments/assets/fb1ea48b-213d-4acb-af17-6802e23f3803)
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @fancywus. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You encountered a 400 Client Error when adding the "bge-reranker-v2-m3" model in Dify v0.15.3 self-hosted via Docker.
  • The error was related to the top_n parameter.
  • The recommended solution was to upgrade to Dify v1.0.0+ and OpenAI plugin v0.0.6+, where this issue is fixed.
  • You were hesitant to upgrade due to the major version change and tried manual modifications without success.
  • The issue remains unresolved without upgrading.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository.
  • If it is, you can keep the discussion open by commenting on this issue; otherwise, I will automatically close it in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @fancywus. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You encountered a 400 Client Error when adding the "bge-reranker-v2-m3" model in Dify v0.15.3 self-hosted via Docker. - The error was related to the `top_n` parameter. - The recommended solution was to upgrade to Dify v1.0.0+ and OpenAI plugin v0.0.6+, where this issue is fixed. - You were hesitant to upgrade due to the major version change and tried manual modifications without success. - The issue remains unresolved without upgrading. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository. - If it is, you can keep the discussion open by commenting on this issue; otherwise, I will automatically close it in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#92