diff --git a/astrbot/core/agent/runners/tool_loop_agent_runner.py b/astrbot/core/agent/runners/tool_loop_agent_runner.py index 1cf572aa8..450e4dbcb 100644 --- a/astrbot/core/agent/runners/tool_loop_agent_runner.py +++ b/astrbot/core/agent/runners/tool_loop_agent_runner.py @@ -188,7 +188,8 @@ class ToolLoopAgentRunner(BaseAgentRunner[TContext]): if isinstance(result, list): tool_call_result_blocks = result elif isinstance(result, MessageChain): - result.type = "tool_call_result" + if result.type is None: + result.type = "tool_call_result" yield AgentResponse( type="tool_call_result", data=AgentResponseData(chain=result),