From dd78782133a980b608570cfb411f721af1278bcc Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 8 Jan 2024 15:09:01 +0530 Subject: [PATCH] fix(utils.py): error handling for litellm --model mistral edge case --- litellm/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/utils.py b/litellm/utils.py index 31bafd61fe1..12818a1fdca 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -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]