mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-08 20:22:16 +00:00
Merge pull request #1652 from BerriAI/litellm_auto_infer_health_check_updated
feat(main.py): support auto-infering mode if not set
This commit is contained in:
@@ -3175,6 +3175,9 @@ async def ahealth_check(
|
||||
if model is None:
|
||||
raise Exception("model not set")
|
||||
|
||||
if model in litellm.model_cost and mode is None:
|
||||
mode = litellm.model_cost[model]["mode"]
|
||||
|
||||
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
|
||||
mode = mode or "chat" # default to chat completion calls
|
||||
|
||||
|
||||
Reference in New Issue
Block a user