Skip to content

Commit 837a694

Browse files
authored
Fix typo: Entrata -> Entra in code (#9922)
* Fix typo: Entrata -> Entra * Fix a few more
1 parent 81e7741 commit 837a694

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

docs/my-website/release_notes/v1.57.8-stable/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ hide_table_of_contents: false
3838
2. OpenAI Moderations - `omni-moderation-latest` support. [Start Here](https://docs.litellm.ai/docs/moderation)
3939
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)
4040
4. Anthropic - non-whitespace char stop sequence handling - [PR](https://github.com/BerriAI/litellm/pull/7484)
41-
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)
41+
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)
4242
6. LM Studio - embedding route support. [Start Here](https://docs.litellm.ai/docs/providers/lm-studio)
4343
7. WatsonX - ZenAPIKeyAuth support. [Start Here](https://docs.litellm.ai/docs/providers/watsonx)
4444

litellm/integrations/azure_storage/azure_storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from litellm._logging import verbose_logger
99
from litellm.constants import AZURE_STORAGE_MSFT_VERSION
1010
from litellm.integrations.custom_batch_logger import CustomBatchLogger
11-
from litellm.llms.azure.common_utils import get_azure_ad_token_from_entrata_id
11+
from litellm.llms.azure.common_utils import get_azure_ad_token_from_entra_id
1212
from litellm.llms.custom_httpx.http_handler import (
1313
AsyncHTTPHandler,
1414
get_async_httpx_client,
@@ -291,7 +291,7 @@ def get_azure_ad_token_from_azure_storage(
291291
"Missing required environment variable: AZURE_STORAGE_CLIENT_SECRET"
292292
)
293293

294-
token_provider = get_azure_ad_token_from_entrata_id(
294+
token_provider = get_azure_ad_token_from_entra_id(
295295
tenant_id=tenant_id,
296296
client_id=client_id,
297297
client_secret=client_secret,

litellm/llms/azure/common_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def process_azure_headers(headers: Union[httpx.Headers, dict]) -> dict:
6161
return {**llm_response_headers, **openai_headers}
6262

6363

64-
def get_azure_ad_token_from_entrata_id(
64+
def get_azure_ad_token_from_entra_id(
6565
tenant_id: str,
6666
client_id: str,
6767
client_secret: str,
@@ -81,7 +81,7 @@ def get_azure_ad_token_from_entrata_id(
8181
"""
8282
from azure.identity import ClientSecretCredential, get_bearer_token_provider
8383

84-
verbose_logger.debug("Getting Azure AD Token from Entrata ID")
84+
verbose_logger.debug("Getting Azure AD Token from Entra ID")
8585

8686
if tenant_id.startswith("os.environ/"):
8787
_tenant_id = get_secret_str(tenant_id)
@@ -324,9 +324,9 @@ def initialize_azure_sdk_client(
324324
timeout = litellm_params.get("timeout")
325325
if not api_key and tenant_id and client_id and client_secret:
326326
verbose_logger.debug(
327-
"Using Azure AD Token Provider from Entrata ID for Azure Auth"
327+
"Using Azure AD Token Provider from Entra ID for Azure Auth"
328328
)
329-
azure_ad_token_provider = get_azure_ad_token_from_entrata_id(
329+
azure_ad_token_provider = get_azure_ad_token_from_entra_id(
330330
tenant_id=tenant_id,
331331
client_id=client_id,
332332
client_secret=client_secret,

tests/litellm/llms/azure/test_azure_common_utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
@pytest.fixture
2020
def setup_mocks():
2121
with patch(
22-
"litellm.llms.azure.common_utils.get_azure_ad_token_from_entrata_id"
23-
) as mock_entrata_token, patch(
22+
"litellm.llms.azure.common_utils.get_azure_ad_token_from_entra_id"
23+
) as mock_entra_token, patch(
2424
"litellm.llms.azure.common_utils.get_azure_ad_token_from_username_password"
2525
) as mock_username_password_token, patch(
2626
"litellm.llms.azure.common_utils.get_azure_ad_token_from_oidc"
@@ -37,7 +37,7 @@ def setup_mocks():
3737
mock_litellm.AZURE_DEFAULT_API_VERSION = "2023-05-15"
3838
mock_litellm.enable_azure_ad_token_refresh = False
3939

40-
mock_entrata_token.return_value = lambda: "mock-entrata-token"
40+
mock_entra_token.return_value = lambda: "mock-entra-token"
4141
mock_username_password_token.return_value = (
4242
lambda: "mock-username-password-token"
4343
)
@@ -49,7 +49,7 @@ def setup_mocks():
4949
)
5050

5151
yield {
52-
"entrata_token": mock_entrata_token,
52+
"entra_token": mock_entra_token,
5353
"username_password_token": mock_username_password_token,
5454
"oidc_token": mock_oidc_token,
5555
"token_provider": mock_token_provider,
@@ -92,8 +92,8 @@ def test_initialize_with_tenant_credentials_env_var(setup_mocks, monkeypatch):
9292
is_async=False,
9393
)
9494

95-
# Verify that get_azure_ad_token_from_entrata_id was called
96-
setup_mocks["entrata_token"].assert_called_once_with(
95+
# Verify that get_azure_ad_token_from_entra_id was called
96+
setup_mocks["entra_token"].assert_called_once_with(
9797
tenant_id="test-tenant-id",
9898
client_id="test-client-id",
9999
client_secret="test-client-secret",
@@ -120,8 +120,8 @@ def test_initialize_with_tenant_credentials(setup_mocks):
120120
is_async=False,
121121
)
122122

123-
# Verify that get_azure_ad_token_from_entrata_id was called
124-
setup_mocks["entrata_token"].assert_called_once_with(
123+
# Verify that get_azure_ad_token_from_entra_id was called
124+
setup_mocks["entra_token"].assert_called_once_with(
125125
tenant_id="test-tenant-id",
126126
client_id="test-client-id",
127127
client_secret="test-client-secret",

0 commit comments

Comments
 (0)