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(llm_node): missing parameters for structure outputs (#20915)

-LAN-1e03c97663a2
diff --git a/api/core/workflow/nodes/llm/node.py b/api/core/workflow/nodes/llm/node.py
index ead929252cc..d27124d62c8 100644
--- a/api/core/workflow/nodes/llm/node.py
+++ b/api/core/workflow/nodes/llm/node.py
@@ -525,6 +525,8 @@ class LLMNode(BaseNode[LLMNodeData]):
# Set appropriate response format based on model capabilities
self._set_response_format(completion_params, model_schema.parameter_rules)
model_config_with_cred.parameters = completion_params
+ # NOTE(-LAN-): This line modify the `self.node_data.model`, which is used in `_invoke_llm()`.
+ node_data_model.completion_params = completion_params
return model, model_config_with_cred
def _fetch_prompt_messages(