fix checking mode on health checks

This commit is contained in:
Ishaan Jaff 2024-07-27 20:21:39 -07:00
parent 9b69e500e5
commit 0627468455
2 changed files with 7 additions and 7 deletions

View file

@ -4797,12 +4797,12 @@ async def ahealth_check(
raise Exception("model not set")
if model in litellm.model_cost and mode is None:
mode = litellm.model_cost[model]["mode"]
mode = litellm.model_cost[model].get("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 = litellm.model_cost[model].get("mode")
mode = mode or "chat" # default to chat completion calls