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]

fix linting error

Ishaan Jaffdfd7a7d547fe
diff --git a/litellm/llms/azure/assistants.py b/litellm/llms/azure/assistants.py
index 1328eb1fea8..2e8c78b259e 100644
--- a/litellm/llms/azure/assistants.py
+++ b/litellm/llms/azure/assistants.py
@@ -43,6 +43,7 @@ class AzureAssistantsAPI(BaseAzureLLM):
api_base=api_base,
model_name="",
api_version=api_version,
+ is_async=False,
)
azure_openai_client = AzureOpenAI(**azure_client_params) # type: ignore
else:
@@ -68,6 +69,7 @@ class AzureAssistantsAPI(BaseAzureLLM):
api_base=api_base,
model_name="",
api_version=api_version,
+ is_async=True,
)
azure_openai_client = AsyncAzureOpenAI(**azure_client_params)
diff --git a/litellm/llms/azure/common_utils.py b/litellm/llms/azure/common_utils.py
index 9933ce50b6a..34cca8fc8a2 100644
--- a/litellm/llms/azure/common_utils.py
+++ b/litellm/llms/azure/common_utils.py
@@ -1,6 +1,6 @@
import json
import os
-from typing import Callable, Optional, Union
+from typing import Any, Callable, Dict, Optional, Union
import httpx
from openai import AsyncAzureOpenAI, AzureOpenAI
@@ -385,7 +385,7 @@ class BaseAzureLLM(BaseOpenAILLM):
api_base += "/"
api_base += f"{model}"
- azure_client_params = {
+ azure_client_params: Dict[str, Any] = {
"api_version": api_version,
"base_url": f"{api_base}",
"http_client": litellm.client_session,
@@ -399,11 +399,11 @@ class BaseAzureLLM(BaseOpenAILLM):
azure_ad_token = get_azure_ad_token_from_oidc(azure_ad_token)
azure_client_params["azure_ad_token"] = azure_ad_token
- elif azure_ad_token_provider is not None:
+ if azure_ad_token_provider is not None:
azure_client_params["azure_ad_token_provider"] = azure_ad_token_provider
if acompletion is True:
- client = AsyncAzureOpenAI(**azure_client_params)
+ client = AsyncAzureOpenAI(**azure_client_params) # type: ignore
else:
- client = AzureOpenAI(**azure_client_params)
+ client = AzureOpenAI(**azure_client_params) # type: ignore
return client