From 3f86760e0baa3f9f2a1d8c433a5ce6f7e1dd0deb Mon Sep 17 00:00:00 2001 From: "Xiang (Sean) Zhou" Date: Tue, 7 Oct 2025 14:00:42 -0700 Subject: [PATCH] chore: Remove unnecessary check tool type and tool attribute tool in config.tools cann't be ToolDict and must have computer_use attr PiperOrigin-RevId: 816368064 --- src/google/adk/tools/computer_use/computer_use_toolset.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/google/adk/tools/computer_use/computer_use_toolset.py b/src/google/adk/tools/computer_use/computer_use_toolset.py index d5c69f73..4a5f0295 100644 --- a/src/google/adk/tools/computer_use/computer_use_toolset.py +++ b/src/google/adk/tools/computer_use/computer_use_toolset.py @@ -190,11 +190,7 @@ class ComputerUseToolset(BaseToolset): # Check if computer use is already configured for tool in llm_request.config.tools: - if ( - isinstance(tool, (types.Tool, types.ToolDict)) - and hasattr(tool, "computer_use") - and tool.computer_use - ): + if isinstance(tool, types.Tool) and tool.computer_use: logger.debug("Computer use already configured in LLM request") return