From 0989d646885e1e1da343f81899e215ea7af480a8 Mon Sep 17 00:00:00 2001 From: "Xiang (Sean) Zhou" Date: Tue, 7 Oct 2025 10:48:16 -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: 816283438 --- src/google/adk/models/google_llm.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/google/adk/models/google_llm.py b/src/google/adk/models/google_llm.py index ba4f0e52..ec93d72c 100644 --- a/src/google/adk/models/google_llm.py +++ b/src/google/adk/models/google_llm.py @@ -313,11 +313,7 @@ class Gemini(BaseLlm): if llm_request.config and llm_request.config.tools: # Check if computer use is 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: llm_request.config.system_instruction = None await self._adapt_computer_use_tool(llm_request)