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
Sameer Kankute7b307c4298e2
diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.pyindex 0f87bb3506c..a9acc1f2c56 100644--- a/litellm/proxy/auth/auth_checks.py+++ b/litellm/proxy/auth/auth_checks.py@@ -2981,28 +2981,28 @@ def _can_object_call_search_tool() -> Literal[True]:"""Check if an object (key/team/project) can access a specific search tool.-+Similar to _can_object_call_model but for search tools.-+Args:search_tool_name: The search tool being requestedallowed_search_tools: List of allowed search tool names for this objectobject_type: Type of object for error messaging-+Returns:True if access is allowed-+Raises:ProxyException if access is denied"""# Empty list means all search tools are allowedif not allowed_search_tools:return True-+# Check if the search tool is in the allowlistif search_tool_name in allowed_search_tools:return True-+# Access deniedraise ProxyException(message=f"{object_type.capitalize()} not allowed to access search tool: {search_tool_name}. "@@ -3019,16 +3019,16 @@ async def can_key_call_search_tool() -> Literal[True]:"""Check if a key can access a specific search tool.-+Similar to can_key_call_model but for search tools.-+Args:search_tool_name: The search tool being requestedvalid_token: The authenticated key-+Returns:True if access is allowed-+Raises:ProxyException if access is denied"""@@ -3047,22 +3047,22 @@ async def can_team_call_search_tool() -> Literal[True]:"""Check if a team can access a specific search tool.-+Similar to can_team_access_model but for search tools.-+Args:search_tool_name: The search tool being requestedteam_object: The team object-+Returns:True if access is allowed-+Raises:ProxyException if access is denied"""if team_object is None:return True-+return _can_object_call_search_tool(search_tool_name=search_tool_name,allowed_search_tools=_search_tool_names_from_object_permission(diff --git a/litellm/router_utils/search_api_router.py b/litellm/router_utils/search_api_router.pyindex daea3c13700..dc9cafceef0 100644--- a/litellm/router_utils/search_api_router.py+++ b/litellm/router_utils/search_api_router.py@@ -28,13 +28,13 @@ class SearchAPIRouter:) -> Tuple[Optional[str], Optional[str]]:"""Resolve search provider credentials from tool configuration ONLY.-+Credentials are stored only in search_tool.litellm_params, never in team/key metadata.This ensures secrets are not exposed in team/key API responses.-+Args:tool_litellm_params: Search tool litellm_params with credentials-+Returns:Tuple of (api_key, api_base) from tool configuration"""