From 7b307c4298e2dcaa112ed8b78ad88b2e05f98603 Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Wed, 29 Apr 2026 12:36:50 +0530 Subject: [PATCH] fix lint --- litellm/proxy/auth/auth_checks.py | 30 +++++++++++------------ litellm/router_utils/search_api_router.py | 6 ++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 0f87bb3506..a9acc1f2c5 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 requested allowed_search_tools: List of allowed search tool names for this object object_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 allowed if not allowed_search_tools: return True - + # Check if the search tool is in the allowlist if search_tool_name in allowed_search_tools: return True - + # Access denied raise 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 requested valid_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 requested team_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.py index daea3c1370..dc9cafceef 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 """