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
This commit is contained in:
Xiang (Sean) Zhou
2025-10-07 10:48:16 -07:00
committed by Copybara-Service
parent 90d4c19c51
commit 0989d64688
+1 -5
View File
@@ -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)