From 255d1bc2398646a10be00a9979992070f48c4d07 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Tue, 25 Nov 2025 18:53:50 +0530 Subject: [PATCH] fix lint errors --- litellm/llms/azure/anthropic/handler.py | 6 ++---- .../llms/azure/anthropic/messages_transformation.py | 11 +---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/litellm/llms/azure/anthropic/handler.py b/litellm/llms/azure/anthropic/handler.py index cfa5eeddaa..e0aec94250 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 copy import json -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union +from typing import TYPE_CHECKING, Callable, Union import httpx @@ -12,7 +12,6 @@ from litellm.llms.anthropic.chat.handler import AnthropicChatCompletion from litellm.llms.custom_httpx.http_handler import ( AsyncHTTPHandler, HTTPHandler, - get_async_httpx_client, ) from litellm.types.utils import ModelResponse from litellm.utils import CustomStreamWrapper @@ -20,8 +19,7 @@ from litellm.utils import CustomStreamWrapper from .transformation import AzureAnthropicConfig if TYPE_CHECKING: - from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper as CustomStreamWrapperType - from litellm.llms.base_llm.chat.transformation import BaseConfig + pass class AzureAnthropicChatCompletion(AnthropicChatCompletion): diff --git a/litellm/llms/azure/anthropic/messages_transformation.py b/litellm/llms/azure/anthropic/messages_transformation.py index 4640f68a3e..55818cc07d 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_logger from 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 GenericLiteLLMParams if 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 needed if isinstance(litellm_params, dict): if api_key and "api_key" not in litellm_params: