mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): error handling for litellm --model mistral edge case
This commit is contained in:
parent
1ca7747371
commit
dd78782133
1 changed files with 1 additions and 0 deletions
|
@ -4002,6 +4002,7 @@ def get_llm_provider(
|
||||||
if (
|
if (
|
||||||
model.split("/", 1)[0] in litellm.provider_list
|
model.split("/", 1)[0] in litellm.provider_list
|
||||||
and model.split("/", 1)[0] not in litellm.model_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]
|
custom_llm_provider = model.split("/", 1)[0]
|
||||||
model = model.split("/", 1)[1]
|
model = model.split("/", 1)[1]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue