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 lint errors
Sameer Kankute255d1bc23986
diff --git a/litellm/llms/azure/anthropic/handler.py b/litellm/llms/azure/anthropic/handler.pyindex cfa5eeddaa9..e0aec942502 100644--- a/litellm/llms/azure/anthropic/handler.py+++ b/litellm/llms/azure/anthropic/handler.py@@ -3,7 +3,7 @@ Azure Anthropic handler - reuses AnthropicChatCompletion logic with Azure authen"""import copyimport json-from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union+from typing import TYPE_CHECKING, Callable, Unionimport httpx@@ -12,7 +12,6 @@ from litellm.llms.anthropic.chat.handler import AnthropicChatCompletionfrom litellm.llms.custom_httpx.http_handler import (AsyncHTTPHandler,HTTPHandler,- get_async_httpx_client,)from litellm.types.utils import ModelResponsefrom litellm.utils import CustomStreamWrapper@@ -20,8 +19,7 @@ from litellm.utils import CustomStreamWrapperfrom .transformation import AzureAnthropicConfigif TYPE_CHECKING:- from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper as CustomStreamWrapperType- from litellm.llms.base_llm.chat.transformation import BaseConfig+ passclass AzureAnthropicChatCompletion(AnthropicChatCompletion):diff --git a/litellm/llms/azure/anthropic/messages_transformation.py b/litellm/llms/azure/anthropic/messages_transformation.pyindex 4640f68a3e0..55818cc07d6 100644--- a/litellm/llms/azure/anthropic/messages_transformation.py+++ b/litellm/llms/azure/anthropic/messages_transformation.py@@ -1,19 +1,12 @@"""Azure Anthropic messages transformation config - extends AnthropicMessagesConfig with Azure authentication"""-from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple+from typing import TYPE_CHECKING, Any, List, Optional, Tuple-import httpx--from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj-from litellm.litellm_core_utils.litellm_logging import verbose_loggerfrom litellm.llms.anthropic.experimental_pass_through.messages.transformation import (AnthropicMessagesConfig,)from litellm.llms.azure.common_utils import BaseAzureLLM-from litellm.types.llms.anthropic_messages.anthropic_response import (- AnthropicMessagesResponse,-)from litellm.types.router import GenericLiteLLMParamsif TYPE_CHECKING:@@ -41,8 +34,6 @@ class AzureAnthropicMessagesConfig(AnthropicMessagesConfig):Validate environment and set up Azure authentication headers for /v1/messages endpoint.Azure Anthropic uses x-api-key header (not api-key)."""- from litellm.secret_managers.main import get_secret_str-# Convert dict to GenericLiteLLMParams if neededif isinstance(litellm_params, dict):if api_key and "api_key" not in litellm_params: