diff --git a/docs/source/resources/configuration_reference.rst b/docs/source/resources/configuration_reference.rst index 8e040f751..298f143d3 100644 --- a/docs/source/resources/configuration_reference.rst +++ b/docs/source/resources/configuration_reference.rst @@ -7,6 +7,29 @@ The following is a complete reference of the ``plano_config.yml`` that controls the Plano gateway. This where you enable capabilities like routing to upstream LLm providers, defining prompt_targets where prompts get routed to, apply guardrails, and enable critical agent observability features. +Model provider headers +---------------------- + +Each entry under ``model_providers`` (or the legacy ``llm_providers`` alias) may include a ``headers`` map of extra +HTTP headers that Plano adds to upstream LLM requests. Plano applies these headers after it sets authentication from +``access_key`` or ``passthrough_auth``, so you can supply provider-specific metadata without replacing the configured +credentials. + +- **Type:** map of strings (header name → value) +- **Optional:** yes +- **Common uses:** required ``User-Agent`` values, organization or account identifiers, or other headers some APIs expect + +.. code-block:: yaml + + model_providers: + - model: moonshotai/kimi-for-coding + access_key: $MOONSHOTAI_API_KEY + base_url: https://api.kimi.com/coding/v1 + headers: + User-Agent: "KimiCLI/1.3" + +The example below includes this and other provider options in context. + .. literalinclude:: includes/plano_config_full_reference.yaml :language: yaml :linenos: diff --git a/docs/source/resources/includes/plano_config_full_reference.yaml b/docs/source/resources/includes/plano_config_full_reference.yaml index 99eb45101..2231a01f9 100644 --- a/docs/source/resources/includes/plano_config_full_reference.yaml +++ b/docs/source/resources/includes/plano_config_full_reference.yaml @@ -47,6 +47,14 @@ model_providers: http_host: api.custom-provider.com access_key: $CUSTOM_API_KEY + # headers: optional map of extra HTTP headers sent on upstream requests (after auth). + # Use for provider-specific requirements such as User-Agent, org IDs, or account headers. + - model: moonshotai/kimi-for-coding + access_key: $MOONSHOTAI_API_KEY + base_url: https://api.kimi.com/coding/v1 + headers: + User-Agent: "KimiCLI/1.3" + # Model aliases - use friendly names instead of full provider model names model_aliases: fast-llm: diff --git a/docs/source/resources/includes/plano_config_full_reference_rendered.yaml b/docs/source/resources/includes/plano_config_full_reference_rendered.yaml index e2ab91103..3779dd739 100644 --- a/docs/source/resources/includes/plano_config_full_reference_rendered.yaml +++ b/docs/source/resources/includes/plano_config_full_reference_rendered.yaml @@ -88,6 +88,18 @@ listeners: port: 443 protocol: https provider_interface: openai + - access_key: $MOONSHOTAI_API_KEY + base_url: https://api.kimi.com/coding/v1 + base_url_path_prefix: /coding/v1 + cluster_name: moonshotai_api.kimi.com + endpoint: api.kimi.com + headers: + User-Agent: KimiCLI/1.3 + model: kimi-for-coding + name: moonshotai/kimi-for-coding + port: 443 + protocol: https + provider_interface: moonshotai name: model_1 output_filters: - input_guards @@ -144,6 +156,18 @@ model_providers: port: 443 protocol: https provider_interface: openai +- access_key: $MOONSHOTAI_API_KEY + base_url: https://api.kimi.com/coding/v1 + base_url_path_prefix: /coding/v1 + cluster_name: moonshotai_api.kimi.com + endpoint: api.kimi.com + headers: + User-Agent: KimiCLI/1.3 + model: kimi-for-coding + name: moonshotai/kimi-for-coding + port: 443 + protocol: https + provider_interface: moonshotai - internal: true model: Plano-Orchestrator name: plano-orchestrator