Add reranker - Azure AI Studio #4

Closed
opened 2026-02-16 10:17:44 -05:00 by yindo · 3 comments
Owner

Originally created by @alexmofidi on GitHub (Feb 11, 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

15.3

Cloud or Self Hosted

Self Hosted (Docker), Cloud

Steps to reproduce

I have deployed Cohere-rerank-v3-english in Azure AI Foundry. {Settings --> Model provider --> Azure AI Foundry}
I added the API key provided by Azure as the JWT token
When I want to add it to dify. It gives 400 error.
Both LLM and Embedding models have been successfully added by Azure OpenAI Service. {Settings --> Model provider --> Azure OpenAI Service}

Image

Image

✔️ Expected Behavior

be validated and connected to Azure. I have already add an LLM and an Embedding to Azure OpenAI Service. yet for the reranker I had to use Azure AI Foundry in Dify panel, but it does not work.

Actual Behavior

I have deployed Cohere-rerank-v3-english in Azure AI Foundry.
When I want to add it to dify. It gives 400 (invalid_param) error.

{code: "invalid_param", message: "HTTP Error 404: Not Found", status: 400}
code
"invalid_param"
message
"HTTP Error 404: Not Found"
status

400

Originally created by @alexmofidi on GitHub (Feb 11, 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 15.3 ### Cloud or Self Hosted Self Hosted (Docker), Cloud ### Steps to reproduce I have deployed Cohere-rerank-v3-english in Azure AI Foundry. {Settings --> Model provider --> Azure AI Foundry} I added the API key provided by Azure as the JWT token When I want to add it to dify. It gives 400 error. Both LLM and Embedding models have been successfully added by Azure OpenAI Service. {Settings --> Model provider --> Azure OpenAI Service} ![Image](https://github.com/user-attachments/assets/33270898-cf45-48a5-9e9c-b3821374a1af) ![Image](https://github.com/user-attachments/assets/13d800af-cacf-4fb9-a3a6-d16b64b00ca2) ### ✔️ Expected Behavior be validated and connected to Azure. I have already add an LLM and an Embedding to Azure OpenAI Service. yet for the reranker I had to use Azure AI Foundry in Dify panel, but it does not work. ### ❌ Actual Behavior I have deployed Cohere-rerank-v3-english in Azure AI Foundry. When I want to add it to dify. It gives 400 (invalid_param) error. {code: "invalid_param", message: "HTTP Error 404: Not Found", status: 400} code : "invalid_param" message : "HTTP Error 404: Not Found" status : 400
yindo closed this issue 2026-02-16 10:17:44 -05:00
Author
Owner

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

Hey @alexmofidi! 👋 I'm here to help you with your bug report. I'm a bot that can assist with bug fixes, answer your questions, and even guide you on how to become a contributor. Let's tackle this issue together!

I found a similar open issue regarding the HTTP Error 404 when registering the Cohere-rerank-v3-multilingual model in Azure AI Studio with Dify. The suggested solution includes the following steps:

  1. Register and Apply for API Key: Ensure you have registered and applied for the Rerank model usage qualification to obtain the API key from Cohere Rerank.

  2. Configure the Re-rank Model in Dify:

    • Navigate to "Model Providers -> Cohere" in Dify.
    • Enter the API key for the Re-rank model.
  3. Set the Re-rank Model in Dataset Retrieval Mode:

    • Go to "Dataset -> Create Dataset -> Retrieval Settings" to add the Re-rank settings.
    • You can also modify the Re-rank configuration in the settings of an existing dataset and in the dataset recall mode settings in application orchestration.
  4. Ensure Correct API Endpoint: Verify that the API endpoint is correct and accessible. A 404 error typically indicates an incorrect endpoint or a non-existent resource. According to the Dify code, the endpoint and API key must be provided in the credentials:

    endpoint = credentials.get("endpoint")
    api_key = credentials.get("jwt_token")
    
    if not endpoint or not api_key:
        raise ValueError("Azure endpoint and API key must be provided in credentials")
    
  5. Verify Model Version: Ensure you are using a supported model version. The supported versions for the multilingual model are:

    • rerank-multilingual-v2.0
    • rerank-multilingual-v3.0

If these steps do not resolve the issue, double-check the API endpoint and ensure the API key is valid and has the necessary permissions. There is also a known issue in the Dify codebase regarding the registration of rerank models with Azure AI Studio, where the validate_credentials function raises a CredentialsValidateFailedError for invalid credentials [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Feb 11, 2025): <!-- Greeting --> Hey @alexmofidi! 👋 I'm here to help you with your bug report. I'm a bot that can assist with bug fixes, answer your questions, and even guide you on how to become a contributor. Let's tackle this issue together! <!-- Answer --> I found a similar open issue regarding the HTTP Error 404 when registering the Cohere-rerank-v3-multilingual model in Azure AI Studio with Dify. The suggested solution includes the following steps: 1. **Register and Apply for API Key**: Ensure you have registered and applied for the Rerank model usage qualification to obtain the API key from [Cohere Rerank](https://cohere.com/rerank). 2. **Configure the Re-rank Model in Dify**: - Navigate to "Model Providers -> Cohere" in Dify. - Enter the API key for the Re-rank model. 3. **Set the Re-rank Model in Dataset Retrieval Mode**: - Go to "Dataset -> Create Dataset -> Retrieval Settings" to add the Re-rank settings. - You can also modify the Re-rank configuration in the settings of an existing dataset and in the dataset recall mode settings in application orchestration. 4. **Ensure Correct API Endpoint**: Verify that the API endpoint is correct and accessible. A 404 error typically indicates an incorrect endpoint or a non-existent resource. According to the Dify code, the endpoint and API key must be provided in the credentials: ```python endpoint = credentials.get("endpoint") api_key = credentials.get("jwt_token") if not endpoint or not api_key: raise ValueError("Azure endpoint and API key must be provided in credentials") ``` 5. **Verify Model Version**: Ensure you are using a supported model version. The supported versions for the multilingual model are: - rerank-multilingual-v2.0 - rerank-multilingual-v3.0 If these steps do not resolve the issue, double-check the API endpoint and ensure the API key is valid and has the necessary permissions. There is also a known issue in the Dify codebase regarding the registration of rerank models with Azure AI Studio, where the `validate_credentials` function raises a `CredentialsValidateFailedError` for invalid credentials <sup>[[1]](https://github.com/langgenius/dify/issues/8081)</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/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/88007a6e-24ef-4bae-9479-d9d23117e064?feedback_type=other)</sup>
Author
Owner

@saito-hiroaki-gtt commented on GitHub (Mar 16, 2025):

Hello.

I am experiencing the same issue.
I've confirmed this issue on the self-hosted version v0.15.3 and the cloud version v1.0.0.

Since there are few options for Rerank models, I feel the impact is not small. Are there any plans for a fix?

@saito-hiroaki-gtt commented on GitHub (Mar 16, 2025): Hello. I am experiencing the same issue. I've confirmed this issue on the self-hosted version v0.15.3 and the cloud version v1.0.0. Since there are few options for Rerank models, I feel the impact is not small. Are there any plans for a fix?
Author
Owner

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

@crazywoola, the user @saito-hiroaki-gtt has confirmed that the issue with the HTTP Error 404 when registering the Cohere-rerank-v3-multilingual model is still relevant, affecting both the self-hosted version v0.15.3 and the cloud version v1.0.0. Could you please assist them with this?

@dosubot[bot] commented on GitHub (Mar 16, 2025): @crazywoola, the user @saito-hiroaki-gtt has confirmed that the issue with the HTTP Error 404 when registering the Cohere-rerank-v3-multilingual model is still relevant, affecting both the self-hosted version v0.15.3 and the cloud version v1.0.0. Could you please assist them with this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#4