Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: #26668 restore manual tool parameter values (#26733)

Arno Ren78f09801b560
diff --git a/api/core/workflow/nodes/agent/agent_node.py b/api/core/workflow/nodes/agent/agent_node.py
index a01686a4b8f..972823b4d95 100644
--- a/api/core/workflow/nodes/agent/agent_node.py
+++ b/api/core/workflow/nodes/agent/agent_node.py
@@ -252,7 +252,10 @@ class AgentNode(Node):
if all(isinstance(v, dict) for _, v in parameters.items()):
params = {}
for key, param in parameters.items():
- if param.get("auto", ParamsAutoGenerated.OPEN.value) == ParamsAutoGenerated.CLOSE.value:
+ if param.get("auto", ParamsAutoGenerated.OPEN.value) in (
+ ParamsAutoGenerated.CLOSE.value,
+ 0,
+ ):
value_param = param.get("value", {})
params[key] = value_param.get("value", "") if value_param is not None else None
else: