Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion astrbot/core/astr_agent_tool_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The addition of stream=ctx.get_config().get("provider_settings", {}).get("stream", False) correctly propagates the streaming setting to the tool_loop_agent call. This ensures that sub-agent execution respects the global streaming configuration.

)
yield mcp.types.CallToolResult(
content=[mcp.types.TextContent(type="text", text=llm_resp.completion_text)]
Expand Down Expand Up @@ -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))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The streaming_response parameter in MainAgentBuildConfig is now correctly initialized using the system's stream setting. This ensures that the main agent's response streaming behavior is consistent with the configured provider_settings when waking up for background task results.


req = ProviderRequest()
conv = await _get_session_conv(event=cron_event, plugin_context=ctx)
Expand Down