fix(main.py): fix ahealth_check to infer mode when custom_llm_provider/model_name used

This commit is contained in:
Krrish Dholakia 2024-06-03 14:06:15 -07:00
parent 6441a1c398
commit 46a0ac7953
2 changed files with 9 additions and 0 deletions

View file

@ -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":