From b2e80ecb8e20fe3a436609fba47ce093945215b0 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 24 Sep 2024 22:44:39 -0700 Subject: [PATCH] docs(user_keys.md): add docs on configurable clientside auth credentials Allow easy switching of finetuned models --- docs/my-website/docs/proxy/user_keys.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/proxy/user_keys.md b/docs/my-website/docs/proxy/user_keys.md index e0227d390c9..92121fd6090 100644 --- a/docs/my-website/docs/proxy/user_keys.md +++ b/docs/my-website/docs/proxy/user_keys.md @@ -1145,11 +1145,32 @@ main(); -### Pass User LLM API Keys -Allows your users to pass in their OpenAI API key (any LiteLLM supported provider) to make requests +### Pass User LLM API Keys / API Base +Allows your users to pass in their OpenAI API key/API base (any LiteLLM supported provider) to make requests Here's how to do it: +#### 1. Enable configurable clientside auth credentials for a provider + +```yaml +model_list: + - model_name: "fireworks_ai/*" + litellm_params: + model: "fireworks_ai/*" + configurable_clientside_auth_params: ["api_base"] +``` + +Specify any/all auth params you want the user to be able to configure: + +- api_base +- api_key +- base_url + +(check [provider docs](../providers/) for provider-specific auth params - e.g. `vertex_project`) + + +#### 2. Test it! + ```python import openai client = openai.OpenAI(