feat: add http_headers support to LlmProvider for custom upstream headers (fixes #592)

Allows users to specify custom HTTP request headers per LLM provider in
plano_config.yaml, useful for providers requiring non-standard auth or
telemetry headers:

  model_providers:
    - model: provider/model
      access_key: $API_KEY
      http_headers:
        X-Custom-Header: "custom-value"
        X-API-Version: "v1"
This commit is contained in:
Octopus 2026-04-03 15:09:29 +08:00
parent aa16a6dc4b
commit b85fab8696
4 changed files with 22 additions and 0 deletions

View file

@ -177,6 +177,11 @@ properties:
passthrough_auth:
type: boolean
description: "When true, forwards the client's Authorization header to upstream instead of using the configured access_key. Useful for routing to services like LiteLLM that validate their own virtual keys."
http_headers:
type: object
description: "Custom HTTP headers to include in requests to this LLM provider. Useful for providers requiring non-standard authentication or telemetry headers."
additionalProperties:
type: string
http_host:
type: string
provider_interface:
@ -224,6 +229,11 @@ properties:
passthrough_auth:
type: boolean
description: "When true, forwards the client's Authorization header to upstream instead of using the configured access_key. Useful for routing to services like LiteLLM that validate their own virtual keys."
http_headers:
type: object
description: "Custom HTTP headers to include in requests to this LLM provider. Useful for providers requiring non-standard authentication or telemetry headers."
additionalProperties:
type: string
http_host:
type: string
provider_interface: