From 7322e284dc4de069bf5061bdfd1b47a9dfeebae4 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Mon, 6 Oct 2025 22:18:43 +0900 Subject: [PATCH] fix: change LlmAgent.tools to covariant Sequence --- src/google/adk/agents/llm_agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/google/adk/agents/llm_agent.py b/src/google/adk/agents/llm_agent.py index 9a96478678..0c1b1a2042 100644 --- a/src/google/adk/agents/llm_agent.py +++ b/src/google/adk/agents/llm_agent.py @@ -25,6 +25,7 @@ from typing import Dict from typing import Literal from typing import Optional +from typing import Sequence from typing import Type from typing import Union import warnings @@ -218,7 +219,7 @@ class LlmAgent(BaseAgent): ``` """ - tools: list[ToolUnion] = Field(default_factory=list) + tools: Sequence[ToolUnion] = Field(default_factory=list) """Tools available to this agent.""" generate_content_config: Optional[types.GenerateContentConfig] = None