Skip to content

When the API key for the rerank model in the openai_api_compatible module configuration is empty, a 401 error is returned. #1724

@1018053166

Description

@1018053166

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

When configuring the rerank model API key as empty in the openai_api_compatible module, the configuration is intercepted by the large model gateway and fails to complete successfully.
The re-ranking model cannot be configured due to an empty API key.
After troubleshooting the code, the rerank model couldn't be configured because the API key was empty. The request header sent by dify with Authorization: Bearer containing an empty string was intercepted by the large model platform's gateway, resulting in a 401 error.

Image

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions