From b8728cd6fcefd7c59b0eaad26f44f7f74b559e26 Mon Sep 17 00:00:00 2001 From: Chen <61995987@qq.com> Date: Mon, 23 Feb 2026 02:45:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D5081=E5=8F=B7PR?= =?UTF-8?q?=E5=9C=A8=E5=AD=90=E4=BB=A3=E7=90=86=E6=89=A7=E8=A1=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E4=BB=BB=E5=8A=A1=E6=97=B6,=E6=9C=AA=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E4=BD=BF=E7=94=A8=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E6=B5=81=E5=BC=8F/=E9=9D=9E=E6=B5=81=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=9A=84=E9=97=AE=E9=A2=98(#5081)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/astr_agent_tool_exec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astrbot/core/astr_agent_tool_exec.py b/astrbot/core/astr_agent_tool_exec.py index 0a8aadb8f..8e42a5eef 100644 --- a/astrbot/core/astr_agent_tool_exec.py +++ b/astrbot/core/astr_agent_tool_exec.py @@ -148,6 +148,7 @@ async def _execute_handoff( contexts=contexts, max_steps=30, run_hooks=tool.agent.run_hooks, + stream=ctx.get_config().get("provider_settings", {}).get("stream", False), ) yield mcp.types.CallToolResult( content=[mcp.types.TextContent(type="text", text=llm_resp.completion_text)] @@ -314,7 +315,7 @@ async def _wake_main_agent_for_background_result( message_type=session.message_type, ) cron_event.role = event.role - config = MainAgentBuildConfig(tool_call_timeout=3600) + config = MainAgentBuildConfig(tool_call_timeout=3600, streaming_response=ctx.get_config().get("provider_settings", {}).get("stream", False)) req = ProviderRequest() conv = await _get_session_conv(event=cron_event, plugin_context=ctx) From 746ffd3edbacaa7e415d90bba0bfd6276efee4e5 Mon Sep 17 00:00:00 2001 From: Chen <61995987@qq.com> Date: Mon, 23 Feb 2026 03:09:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=E4=B8=BA=E5=AD=90=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=9C=E7=A8=8B=E5=9B=BE=E7=89=87URL?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/agent/handoff.py | 5 +++++ astrbot/core/astr_agent_tool_exec.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/astrbot/core/agent/handoff.py b/astrbot/core/agent/handoff.py index 79a2945cd..8fb6ce5d1 100644 --- a/astrbot/core/agent/handoff.py +++ b/astrbot/core/agent/handoff.py @@ -44,6 +44,11 @@ def default_parameters(self) -> dict: "type": "string", "description": "The input to be handed off to another agent. This should be a clear and concise request or task.", }, + "image_urls": { + "type": "array", + "items": {"type": "string"}, + "description": "Optional: List of public image URLs for multi-modal tasks (e.g. video generation reference images).", + }, "background_task": { "type": "boolean", "description": ( diff --git a/astrbot/core/astr_agent_tool_exec.py b/astrbot/core/astr_agent_tool_exec.py index 8e42a5eef..bfda7b17a 100644 --- a/astrbot/core/astr_agent_tool_exec.py +++ b/astrbot/core/astr_agent_tool_exec.py @@ -99,6 +99,7 @@ async def _execute_handoff( **tool_args, ): input_ = tool_args.get("input") + image_urls = tool_args.get("image_urls") # make toolset for the agent tools = tool.agent.tools @@ -143,6 +144,7 @@ async def _execute_handoff( event=event, chat_provider_id=prov_id, prompt=input_, + image_urls=image_urls, system_prompt=tool.agent.instructions, tools=toolset, contexts=contexts, From 140c014168fd1ab3bb08c24eaafc71b3353a3758 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 23 Feb 2026 22:13:41 +0800 Subject: [PATCH 3/4] fix: update description for image_urls parameter in HandoffTool to clarify usage in multimodal tasks --- astrbot/core/agent/handoff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/agent/handoff.py b/astrbot/core/agent/handoff.py index 8fb6ce5d1..8475009d3 100644 --- a/astrbot/core/agent/handoff.py +++ b/astrbot/core/agent/handoff.py @@ -47,7 +47,7 @@ def default_parameters(self) -> dict: "image_urls": { "type": "array", "items": {"type": "string"}, - "description": "Optional: List of public image URLs for multi-modal tasks (e.g. video generation reference images).", + "description": "Optional: An array of image sources (public HTTP URLs or local file paths) used as references in multimodal tasks such as video generation.", }, "background_task": { "type": "boolean", From 3d13673122a4081d03e57b3276d0ec9eb71d91d7 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 23 Feb 2026 22:15:30 +0800 Subject: [PATCH 4/4] ruff format --- astrbot/core/astr_agent_tool_exec.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astrbot/core/astr_agent_tool_exec.py b/astrbot/core/astr_agent_tool_exec.py index bfda7b17a..19b451978 100644 --- a/astrbot/core/astr_agent_tool_exec.py +++ b/astrbot/core/astr_agent_tool_exec.py @@ -317,7 +317,12 @@ async def _wake_main_agent_for_background_result( message_type=session.message_type, ) cron_event.role = event.role - config = MainAgentBuildConfig(tool_call_timeout=3600, streaming_response=ctx.get_config().get("provider_settings", {}).get("stream", False)) + config = MainAgentBuildConfig( + tool_call_timeout=3600, + streaming_response=ctx.get_config() + .get("provider_settings", {}) + .get("stream", False), + ) req = ProviderRequest() conv = await _get_session_conv(event=cron_event, plugin_context=ctx)