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
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