From c89c0eab8cd8210aea679b2ea9189946841ae5fe Mon Sep 17 00:00:00 2001 From: chandan84 <61125092+chandan84@users.noreply.github.com> Date: Tue, 25 Feb 2025 15:15:53 -0500 Subject: [PATCH] Update changing_a_model.md updated docs for extra_headers usage for litellm --- docs/docs/usage-guide/changing_a_model.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/usage-guide/changing_a_model.md b/docs/docs/usage-guide/changing_a_model.md index d221b953..977bd022 100644 --- a/docs/docs/usage-guide/changing_a_model.md +++ b/docs/docs/usage-guide/changing_a_model.md @@ -30,6 +30,14 @@ model="" # the OpenAI model you've deployed on Azure (e.g. gpt-4o) fallback_models=["..."] ``` +Passing custom headers to the underlying LLM Model API can be done by setting extra_headers parameter to litellm. +``` +[litellm] +extra_headers='{"projectId": "", ...}') #The value of this setting should be a JSON string representing the desired headers, a ValueError is thrown otherwise. +``` +This enables users to pass authorization tokens or API keys, when routing requests through an API management gateway. + + ### Ollama You can run models locally through either [VLLM](https://docs.litellm.ai/docs/providers/vllm) or [Ollama](https://docs.litellm.ai/docs/providers/ollama)