Allow custom providers to configure default headers - #33144
Conversation
|
+1 on landing a canonical per-provider header map. One use case worth designing for while the shape is still open: header-routed proxies that fan one endpoint out to many upstreams. Some gateways (mine is a local OpenAI-compatible proxy that picks the upstream from an
None of that needs to be in this PR. I just want to flag that "headers are part of what distinguishes one custom provider from another," not only an auth detail on a single gateway, so the config shape you settle on here leaves room for it. Happy to contribute the picker and switching side as a follow-up once the header key lands. I have it working against my fork already. |
Summary
Allow custom OpenAI-compatible providers to configure client-level
default_headers.Some custom gateways require provider-specific HTTP headers or block certain SDK request fingerprints. This change lets users configure those headers in
custom_providerswithout patching Hermesprovider code.
Example: