fix(config): Fixes SequentialAgent.config_type type hint

Without ClassVar, it will cause pydantic to generate warning.

PiperOrigin-RevId: 795518646
This commit is contained in:
Wei Sun (Jack)
2025-08-15 10:13:39 -07:00
committed by Copybara-Service
parent a2832d5ac7
commit 8a9a271141
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ class LlmAgent(BaseAgent):
When not set, the agent will inherit the model from its ancestor.
"""
config_type: ClassVar[type[BaseAgentConfig]] = LlmAgentConfig
config_type: ClassVar[Type[BaseAgentConfig]] = LlmAgentConfig
"""The config type for this agent."""
instruction: Union[str, InstructionProvider] = ''
+2 -1
View File
@@ -17,6 +17,7 @@
from __future__ import annotations
from typing import AsyncGenerator
from typing import ClassVar
from typing import Type
from typing_extensions import override
@@ -33,7 +34,7 @@ from .sequential_agent_config import SequentialAgentConfig
class SequentialAgent(BaseAgent):
"""A shell agent that runs its sub-agents in sequence."""
config_type: Type[BaseAgentConfig] = SequentialAgentConfig
config_type: ClassVar[Type[BaseAgentConfig]] = SequentialAgentConfig
"""The config type for this agent."""
@override