File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 19
19
20
20
from google .genai import types
21
21
from pydantic import BaseModel
22
+ from pydantic import ConfigDict
22
23
from pydantic import model_validator
23
24
from typing_extensions import override
24
25
27
28
from ..memory .in_memory_memory_service import InMemoryMemoryService
28
29
from ._forwarding_artifact_service import ForwardingArtifactService
29
30
from .base_tool import BaseTool
31
+ from .base_tool import BaseToolConfig
30
32
from .base_tool import ToolArgsConfig
31
33
from .tool_context import ToolContext
32
34
@@ -175,7 +177,7 @@ def from_config(
175
177
)
176
178
177
179
178
- class AgentToolConfig (BaseModel ):
180
+ class AgentToolConfig (BaseToolConfig ):
179
181
"""The config for the AgentTool."""
180
182
181
183
agent : AgentRefConfig
Original file line number Diff line number Diff line change @@ -259,3 +259,10 @@ def my_function(config: ToolArgsConfig) -> BaseTool:
259
259
260
260
args : Optional [ToolArgsConfig ] = None
261
261
"""The args for the tool."""
262
+
263
+
264
+ class BaseToolConfig (BaseModel ):
265
+ """The base configurations for all the tools."""
266
+
267
+ model_config = ConfigDict (extra = "forbid" )
268
+ """Forbid extra fields."""
You can’t perform that action at this time.
0 commit comments