forked from phoenix/litellm-mirror
feat(main.py): support auto-infering mode if not set
This commit is contained in:
parent
f7e64cd528
commit
bcad7c58a8
1 changed files with 3 additions and 0 deletions
|
@ -3175,6 +3175,9 @@ async def ahealth_check(
|
||||||
if model is None:
|
if model is None:
|
||||||
raise Exception("model not set")
|
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)
|
model, custom_llm_provider, _, _ = get_llm_provider(model=model)
|
||||||
mode = mode or "chat" # default to chat completion calls
|
mode = mode or "chat" # default to chat completion calls
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue