mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(main.py): fix ahealth_check to infer mode when custom_llm_provider/model_name
used
This commit is contained in:
parent
6441a1c398
commit
46a0ac7953
2 changed files with 9 additions and 0 deletions
|
@ -4333,6 +4333,10 @@ async def ahealth_check(
|
||||||
mode = litellm.model_cost[model]["mode"]
|
mode = litellm.model_cost[model]["mode"]
|
||||||
|
|
||||||
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
|
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
|
mode = mode or "chat" # default to chat completion calls
|
||||||
|
|
||||||
if custom_llm_provider == "azure":
|
if custom_llm_provider == "azure":
|
||||||
|
|
|
@ -34,6 +34,11 @@ model_list:
|
||||||
api_base: https://openai-france-1234.openai.azure.com
|
api_base: https://openai-france-1234.openai.azure.com
|
||||||
api_key: os.environ/AZURE_FRANCE_API_KEY
|
api_key: os.environ/AZURE_FRANCE_API_KEY
|
||||||
model: azure/gpt-turbo
|
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:
|
router_settings:
|
||||||
enable_pre_call_checks: true
|
enable_pre_call_checks: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue