diff --git a/litellm/utils.py b/litellm/utils.py index 17a31751d9..d642fbbb95 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