From c9e53bf78c9e894f749e077a988f2ac5408842c8 Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 20 Jan 2026 21:35:10 +0800 Subject: [PATCH] fix(llm): update final chunk event condition to include sandbox check --- api/core/workflow/nodes/llm/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/nodes/llm/node.py b/api/core/workflow/nodes/llm/node.py index 5b48b90e62..99bf40064f 100644 --- a/api/core/workflow/nodes/llm/node.py +++ b/api/core/workflow/nodes/llm/node.py @@ -423,8 +423,8 @@ class LLMNode(Node[LLMNodeData]): outputs["structured_output"] = structured_output.structured_output # Send final chunk event to indicate streaming is complete - if not self.tool_call_enabled: - # For tool calls, final events are already sent in _process_tool_outputs + if not self.tool_call_enabled and sandbox is None: + # For tool calls and sandbox, final events are already sent in _process_tool_outputs yield StreamChunkEvent( selector=[self._node_id, "text"], chunk="",