From f0f796fdc082d27259881fc21687eef350d67a07 Mon Sep 17 00:00:00 2001 From: Novice Date: Tue, 27 Jan 2026 10:49:14 +0800 Subject: [PATCH] fix: remove additional sse event --- api/configs/app_config.py | 5 ++++- api/core/workflow/nodes/llm/entities.py | 4 +++- api/core/workflow/nodes/llm/node.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api/configs/app_config.py b/api/configs/app_config.py index 51e3738580..0ecf05a9b9 100644 --- a/api/configs/app_config.py +++ b/api/configs/app_config.py @@ -90,7 +90,10 @@ class DifyConfig( "Defaults to api/bin when unset." ), ) - + DIFY_PORT: int = Field( + default=5001, + description="Port used by Dify to communicate with the host machine.", + ) # Before adding any config, # please consider to arrange it in the proper config group of existed or added # for better readability and maintainability. diff --git a/api/core/workflow/nodes/llm/entities.py b/api/core/workflow/nodes/llm/entities.py index 903f6acd88..e6b25be026 100644 --- a/api/core/workflow/nodes/llm/entities.py +++ b/api/core/workflow/nodes/llm/entities.py @@ -77,7 +77,9 @@ class ToolMetadata(BaseModel): # Core fields enabled: bool = True - type: ToolProviderType = Field(..., description="Tool provider type: builtin, api, mcp, workflow") + type: ToolProviderType = Field( + default=ToolProviderType.BUILT_IN, description="Tool provider type: builtin, api, mcp, workflow" + ) provider_name: str = Field(..., description="Tool provider name/identifier") tool_name: str = Field(..., description="Tool name") diff --git a/api/core/workflow/nodes/llm/node.py b/api/core/workflow/nodes/llm/node.py index f96f3eecbc..f64d1c8ab0 100644 --- a/api/core/workflow/nodes/llm/node.py +++ b/api/core/workflow/nodes/llm/node.py @@ -420,7 +420,7 @@ 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 and sandbox is None: + if not self.tool_call_enabled: # For tool calls and sandbox, final events are already sent in _process_tool_outputs yield StreamChunkEvent( selector=[self._node_id, "text"],