From 90f5aa7125ed5617a4334c6eab14af0687f1361b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 3 Jun 2024 14:06:15 -0700 Subject: [PATCH] fix(main.py): fix ahealth_check to infer mode when `custom_llm_provider/model_name` used --- litellm/main.py | 4 ++++ litellm/proxy/_super_secret_config.yaml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/litellm/main.py b/litellm/main.py index d71b046a015..f1d47427f42 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -4333,6 +4333,10 @@ async def ahealth_check( mode = litellm.model_cost[model]["mode"] model, custom_llm_provider, _, _ = get_llm_provider(model=model) + + if model in litellm.model_cost and mode is None: + mode = litellm.model_cost[model]["mode"] + mode = mode or "chat" # default to chat completion calls if custom_llm_provider == "azure": diff --git a/litellm/proxy/_super_secret_config.yaml b/litellm/proxy/_super_secret_config.yaml index 6e458350cb9..b6a6a06adfa 100644 --- a/litellm/proxy/_super_secret_config.yaml +++ b/litellm/proxy/_super_secret_config.yaml @@ -34,6 +34,11 @@ model_list: api_base: https://openai-france-1234.openai.azure.com api_key: os.environ/AZURE_FRANCE_API_KEY model: azure/gpt-turbo +- model_name: text-embedding + litellm_params: + model: textembedding-gecko-multilingual@001 + vertex_project: my-project-9d5c + vertex_location: us-central1 router_settings: enable_pre_call_checks: true