style: match full-package Ruff import classification

This commit is contained in:
tarunag10 2026-08-20 13:02:19 +05:30
parent 8e57d4d457
commit cf8a18ee7b
2 changed files with 11 additions and 6 deletions

View file

@ -4,6 +4,9 @@ from collections.abc import Iterable, Mapping, Sequence
from datetime import datetime
from typing import TYPE_CHECKING, Any, Final, Literal, Optional, TypeAlias, TypedDict, overload
from openai.types.chat import ChatCompletionToolParam
from openai.types.responses.function_tool_param import FunctionToolParam
from litellm._logging import verbose_logger
from litellm.constants import MAXIMUM_TRACEBACK_LINES_TO_LOG
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj
@ -30,14 +33,13 @@ from litellm.types.utils import (
StandardLoggingMCPToolCall,
)
from litellm.utils import Rules, function_setup
from openai.types.chat import ChatCompletionToolParam
from openai.types.responses.function_tool_param import FunctionToolParam
if TYPE_CHECKING:
from litellm.proxy._types import UserAPIKeyAuth
from litellm.proxy.utils import ProxyLogging
from mcp.types import CallToolResult
from mcp.types import Tool as MCPTool
from litellm.proxy._types import UserAPIKeyAuth
from litellm.proxy.utils import ProxyLogging
else:
MCPTool = Any
@ -667,6 +669,7 @@ class LiteLLM_Proxy_MCP_Handler:
) -> list[MCPToolResult]:
"""Execute tool calls and return results."""
from fastapi import HTTPException
from litellm._uuid import uuid
from litellm.exceptions import BlockedPiiEntityError, GuardrailRaisedException
from litellm.proxy._experimental.mcp_server.mcp_server_manager import (

View file

@ -22,9 +22,10 @@ from litellm.types.llms.openai import (
)
if TYPE_CHECKING:
from mcp.types import Tool as MCPTool
from litellm.proxy._types import UserAPIKeyAuth
from litellm.responses.mcp.litellm_proxy_mcp_handler import MCPToolResult
from mcp.types import Tool as MCPTool
else:
MCPTool = Any
@ -330,10 +331,11 @@ class MCPEnhancedStreamingIterator(BaseResponsesAPIStreamingIterator):
def _extract_mcp_headers_from_params(self) -> None:
"""Extract MCP headers from original request params to pass to tool calls"""
from starlette.datastructures import Headers
from litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp import (
MCPRequestHandler,
)
from starlette.datastructures import Headers
# Extract headers from secret_fields in original_request_params
raw_headers_from_request: dict[str, str] | None = None