From 71352b1b36eca94c366fd8ca74bb2ebf8de65c0e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 5 Apr 2024 08:53:24 -0700 Subject: [PATCH] fix add azure/command-r-plus --- litellm/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index 17a31751d..d642fbbb9 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -5573,6 +5573,16 @@ def get_llm_provider( dynamic_api_key = None # check if llm provider provided + # AZURE AI-Studio Logic - Azure AI Studio supports AZURE/Cohere + # If User passes azure/command-r-plus -> we should send it to cohere_chat/command-r-plus + if ( + model.split("/", 1)[0] == "azure" + and model.split("/", 1)[1] in litellm.cohere_chat_models + ): + custom_llm_provider = "openai" + model = model.split("/", 1)[1] + return model, custom_llm_provider, dynamic_api_key, api_base + if custom_llm_provider: return model, custom_llm_provider, dynamic_api_key, api_base