nah
This commit is contained in:
@@ -77,7 +77,9 @@ class BaseAgent:
|
||||
)
|
||||
|
||||
# Prepare tool definitions
|
||||
tool_defs = self._get_allowed_tools()
|
||||
tool_defs = self._get_allowed_tools(
|
||||
followup_mode=str(session.metadata.get("followup_mode", "none")),
|
||||
)
|
||||
|
||||
# Stream model response
|
||||
config = ModelConfig(
|
||||
@@ -262,6 +264,7 @@ class BaseAgent:
|
||||
"content": accumulated_content,
|
||||
"artifacts": artifacts,
|
||||
"tool_executions": tool_executions,
|
||||
"conversation": conversation,
|
||||
"usage": {
|
||||
"input_tokens": total_input_tokens,
|
||||
"output_tokens": total_output_tokens,
|
||||
@@ -341,8 +344,10 @@ class BaseAgent:
|
||||
|
||||
return tool_exec
|
||||
|
||||
def _get_allowed_tools(self) -> list[dict[str, Any]]:
|
||||
def _get_allowed_tools(self, followup_mode: str = "none") -> list[dict[str, Any]]:
|
||||
"""Return tool definitions filtered by this agent's allowed_tools."""
|
||||
if followup_mode == "transform":
|
||||
return []
|
||||
if not self.mcp.is_running:
|
||||
return []
|
||||
all_tools = self.mcp.get_tool_definitions()
|
||||
|
||||
Reference in New Issue
Block a user