From 50accc327ca24f573bafbe7615494ba773dfbaf0 Mon Sep 17 00:00:00 2001 From: David Manouchehri Date: Thu, 16 May 2024 22:02:09 +0000 Subject: [PATCH] Fix(router.py): Kill a bug that forced Azure OpenAI to have an API key, even though we can use OIDC instead. --- litellm/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/router.py b/litellm/router.py index 529ba0f75..6400ff64e 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -2375,7 +2375,7 @@ class Router: organization = litellm.get_secret(organization_env_name) litellm_params["organization"] = organization - if "azure" in model_name and isinstance(api_key, str): + if "azure" in model_name: if api_base is None or not isinstance(api_base, str): raise ValueError( f"api_base is required for Azure OpenAI. Set it on your config. Model - {model}"