fix(utils.py): error handling for litellm --model mistral edge case

This commit is contained in:
Krrish Dholakia 2024-01-08 15:09:01 +05:30
parent 1ca7747371
commit dd78782133

View file

@ -4002,6 +4002,7 @@ def get_llm_provider(
if (
model.split("/", 1)[0] in litellm.provider_list
and model.split("/", 1)[0] not in litellm.model_list
and len(model.split("/")) > 1 # handle edge case where user passes in `litellm --model mistral` https://github.com/BerriAI/litellm/issues/1351
):
custom_llm_provider = model.split("/", 1)[0]
model = model.split("/", 1)[1]