Skip to content

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]

test_azure_embedding_max_retries_0

Ishaan Jaff80a5cfa01dab
diff --git a/litellm/llms/azure/azure.py b/litellm/llms/azure/azure.py
index e9bb5733ffd..172c963acba 100644
--- a/litellm/llms/azure/azure.py
+++ b/litellm/llms/azure/azure.py
@@ -652,7 +652,6 @@ class AzureChatCompletion(BaseAzureLLM, BaseLLM):
model: str,
data: dict,
model_response: EmbeddingResponse,
- azure_client_params: dict,
input: list,
logging_obj: LiteLLMLoggingObj,
api_base: str,
@@ -743,14 +742,6 @@ class AzureChatCompletion(BaseAzureLLM, BaseLLM):
data = {"model": model, "input": input, **optional_params}
if max_retries is None:
max_retries = litellm.DEFAULT_MAX_RETRIES
- azure_client_params = self.initialize_azure_sdk_client(
- litellm_params=litellm_params or {},
- api_key=api_key,
- model_name=model,
- api_version=api_version,
- api_base=api_base,
- is_async=False,
- )
## LOGGING
logging_obj.pre_call(
input=input,
@@ -769,7 +760,6 @@ class AzureChatCompletion(BaseAzureLLM, BaseLLM):
logging_obj=logging_obj,
api_key=api_key,
model_response=model_response,
- azure_client_params=azure_client_params,
timeout=timeout,
client=client,
litellm_params=litellm_params,
diff --git a/litellm/llms/azure/completion/handler.py b/litellm/llms/azure/completion/handler.py
index 91a00ebc2f8..1bc9aaba9bf 100644
--- a/litellm/llms/azure/completion/handler.py
+++ b/litellm/llms/azure/completion/handler.py
@@ -12,18 +12,6 @@ from ..common_utils import AzureOpenAIError, BaseAzureLLM
openai_text_completion_config = OpenAITextCompletionConfig()
-def select_azure_base_url_or_endpoint(azure_client_params: dict):
- azure_endpoint = azure_client_params.get("azure_endpoint", None)
- if azure_endpoint is not None:
- # see : https://github.com/openai/openai-python/blob/3d61ed42aba652b547029095a7eb269ad4e1e957/src/openai/lib/azure.py#L192
- if "/openai/deployments" in azure_endpoint:
- # this is base_url, not an azure_endpoint
- azure_client_params["base_url"] = azure_endpoint
- azure_client_params.pop("azure_endpoint")
-
- return azure_client_params
-
-
class AzureTextCompletion(BaseAzureLLM):
def __init__(self) -> None:
super().__init__()