The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix typo: Entrata -> Entra in code (#9922)
Marc Abramowitz837a6948d83b
diff --git a/docs/my-website/release_notes/v1.57.8-stable/index.md b/docs/my-website/release_notes/v1.57.8-stable/index.mdindex ea712f0f77b..78fe13f2ed7 100644--- a/docs/my-website/release_notes/v1.57.8-stable/index.md+++ b/docs/my-website/release_notes/v1.57.8-stable/index.md@@ -38,7 +38,7 @@ hide_table_of_contents: false2. OpenAI Moderations - `omni-moderation-latest` support. [Start Here](https://docs.litellm.ai/docs/moderation)3. Azure O1 - fake streaming support. This ensures if a `stream=true` is passed, the response is streamed. [Start Here](https://docs.litellm.ai/docs/providers/azure)4. Anthropic - non-whitespace char stop sequence handling - [PR](https://github.com/BerriAI/litellm/pull/7484)-5. Azure OpenAI - support Entra id username + password based auth. [Start Here](https://docs.litellm.ai/docs/providers/azure#entrata-id---use-tenant_id-client_id-client_secret)+5. Azure OpenAI - support Entra ID username + password based auth. [Start Here](https://docs.litellm.ai/docs/providers/azure#entra-id---use-tenant_id-client_id-client_secret)6. LM Studio - embedding route support. [Start Here](https://docs.litellm.ai/docs/providers/lm-studio)7. WatsonX - ZenAPIKeyAuth support. [Start Here](https://docs.litellm.ai/docs/providers/watsonx)diff --git a/litellm/integrations/azure_storage/azure_storage.py b/litellm/integrations/azure_storage/azure_storage.pyindex 27f5e0e1123..24a3f5749ad 100644--- a/litellm/integrations/azure_storage/azure_storage.py+++ b/litellm/integrations/azure_storage/azure_storage.py@@ -8,7 +8,7 @@ from typing import List, Optionalfrom litellm._logging import verbose_loggerfrom litellm.constants import AZURE_STORAGE_MSFT_VERSIONfrom litellm.integrations.custom_batch_logger import CustomBatchLogger-from litellm.llms.azure.common_utils import get_azure_ad_token_from_entrata_id+from litellm.llms.azure.common_utils import get_azure_ad_token_from_entra_idfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,get_async_httpx_client,@@ -291,7 +291,7 @@ class AzureBlobStorageLogger(CustomBatchLogger):"Missing required environment variable: AZURE_STORAGE_CLIENT_SECRET")- token_provider = get_azure_ad_token_from_entrata_id(+ token_provider = get_azure_ad_token_from_entra_id(tenant_id=tenant_id,client_id=client_id,client_secret=client_secret,diff --git a/litellm/llms/azure/common_utils.py b/litellm/llms/azure/common_utils.pyindex e190c8bfd7d..012f47c8517 100644--- a/litellm/llms/azure/common_utils.py+++ b/litellm/llms/azure/common_utils.py@@ -61,7 +61,7 @@ def process_azure_headers(headers: Union[httpx.Headers, dict]) -> dict:return {**llm_response_headers, **openai_headers}-def get_azure_ad_token_from_entrata_id(+def get_azure_ad_token_from_entra_id(tenant_id: str,client_id: str,client_secret: str,@@ -81,7 +81,7 @@ def get_azure_ad_token_from_entrata_id("""from azure.identity import ClientSecretCredential, get_bearer_token_provider- verbose_logger.debug("Getting Azure AD Token from Entrata ID")+ verbose_logger.debug("Getting Azure AD Token from Entra ID")if tenant_id.startswith("os.environ/"):_tenant_id = get_secret_str(tenant_id)@@ -324,9 +324,9 @@ class BaseAzureLLM(BaseOpenAILLM):timeout = litellm_params.get("timeout")if not api_key and tenant_id and client_id and client_secret:verbose_logger.debug(- "Using Azure AD Token Provider from Entrata ID for Azure Auth"+ "Using Azure AD Token Provider from Entra ID for Azure Auth")- azure_ad_token_provider = get_azure_ad_token_from_entrata_id(+ azure_ad_token_provider = get_azure_ad_token_from_entra_id(tenant_id=tenant_id,client_id=client_id,client_secret=client_secret,diff --git a/tests/litellm/llms/azure/test_azure_common_utils.py b/tests/litellm/llms/azure/test_azure_common_utils.pyindex bbd2a282fcd..42b5903ee84 100644--- a/tests/litellm/llms/azure/test_azure_common_utils.py+++ b/tests/litellm/llms/azure/test_azure_common_utils.py@@ -19,8 +19,8 @@ from litellm.types.utils import CallTypes@pytest.fixturedef setup_mocks():with patch(- "litellm.llms.azure.common_utils.get_azure_ad_token_from_entrata_id"- ) as mock_entrata_token, patch(+ "litellm.llms.azure.common_utils.get_azure_ad_token_from_entra_id"+ ) as mock_entra_token, patch("litellm.llms.azure.common_utils.get_azure_ad_token_from_username_password") as mock_username_password_token, patch("litellm.llms.azure.common_utils.get_azure_ad_token_from_oidc"@@ -37,7 +37,7 @@ def setup_mocks():mock_litellm.AZURE_DEFAULT_API_VERSION = "2023-05-15"mock_litellm.enable_azure_ad_token_refresh = False- mock_entrata_token.return_value = lambda: "mock-entrata-token"+ mock_entra_token.return_value = lambda: "mock-entra-token"mock_username_password_token.return_value = (lambda: "mock-username-password-token")@@ -49,7 +49,7 @@ def setup_mocks():)yield {- "entrata_token": mock_entrata_token,+ "entra_token": mock_entra_token,"username_password_token": mock_username_password_token,"oidc_token": mock_oidc_token,"token_provider": mock_token_provider,@@ -92,8 +92,8 @@ def test_initialize_with_tenant_credentials_env_var(setup_mocks, monkeypatch):is_async=False,)- # Verify that get_azure_ad_token_from_entrata_id was called- setup_mocks["entrata_token"].assert_called_once_with(+ # Verify that get_azure_ad_token_from_entra_id was called+ setup_mocks["entra_token"].assert_called_once_with(tenant_id="test-tenant-id",client_id="test-client-id",client_secret="test-client-secret",@@ -120,8 +120,8 @@ def test_initialize_with_tenant_credentials(setup_mocks):is_async=False,)- # Verify that get_azure_ad_token_from_entrata_id was called- setup_mocks["entrata_token"].assert_called_once_with(+ # Verify that get_azure_ad_token_from_entra_id was called+ setup_mocks["entra_token"].assert_called_once_with(tenant_id="test-tenant-id",client_id="test-client-id",client_secret="test-client-secret",