Fix typo: Entrata -> Entra in code (#9922)
* Fix typo: Entrata -> Entra * Fix a few more
This commit is contained in:
parent
81e7741107
commit
837a6948d8
@ -38,7 +38,7 @@ hide_table_of_contents: false
|
||||
2. 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)
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ from typing import List, Optional
|
||||
from litellm._logging import verbose_logger
|
||||
from litellm.constants import AZURE_STORAGE_MSFT_VERSION
|
||||
from 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_id
|
||||
from 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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -19,8 +19,8 @@ from litellm.types.utils import CallTypes
|
||||
@pytest.fixture
|
||||
def 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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user