Skip to content

[Bug]: No custom headers pass on model discovery for custom endpoints #10561

@Anthony-Jhoiro

Description

@Anthony-Jhoiro

What happened?

I want to setup a custom endpoint for an OpenAI compatible API but the model discovery fails with an authentication error. To authenticate to the endpoint, I need to had a specific Header wich was not pass to the request even if it is in the confuguration

Version Information

3dd827e (just cloned the repository)

Steps to Reproduce

  1. add this configuration:
endpoints:
  custom:
    - name: "Custom endpoint"
      apiKey: "my-api-key"
      headers:
        my-custom-header: "value"
      baseURL: "https://my-endpoint/v1"
      models:
        default:
          - "demo-model"
        fetch: true
      titleConvo: true
      modelDisplayLabel: "Custom endpoint"
  1. start librechat

Result:
The server is called on https://my-endpoint/v1/models without the my-custom-header header

What browsers are you seeing the problem on?

Firefox

Relevant log output

Failed to fetch models from Custom endpoint API The server responded with status 401

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions