Skip to content

[Feature]: rerank 配置支持 extra_headers #1314

@caisirius

Description

@caisirius

Problem Statement

Rerank configuration does not support extra_headers, while embedding configuration does. This prevents users from using rerank services through API gateways that require custom headers (e.g., x-gw-apikey for my private api authentication). The current implementation dont support, and OpenAIRerankClient hardcodes request headers without merging additional headers.

Proposed Solution

as your decision

Alternatives Considered

No response

Feature Area

Core (Client/Engine)

Use Case

This allows configuration like:
{
"rerank": {
"api_base": "https://gateway.com/v1/rerank",
"api_key": "internal-key",
"extra_headers": {"x-gw-apikey": "Bearer real-key"}
}
}

Example API (Optional)

Additional Context

No response

Contribution

  • I am willing to contribute to implementing this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions