The streaming ouput blocked after multiple nodes merged into one #12195

Closed
opened 2026-02-21 19:06:18 -05:00 by yindo · 8 comments
Owner

Originally created by @Halfknow on GitHub (Mar 26, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

As the first node in red frame can streaming output the llm answer, but the last red node is blocked due to the mid line merging two nodes into one.
Image

✔️ Expected Behavior

The last answer node outputing the llm result should be in streaming mode, even the mid line merges two there is no way to block the streaming answer.

Actual Behavior

Actually, the final red node answer is in blocking mode.

Originally created by @Halfknow on GitHub (Mar 26, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version v1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce As the first node in red frame can streaming output the llm answer, but the last red node is blocked due to the mid line merging two nodes into one. ![Image](https://github.com/user-attachments/assets/5eddf4b3-53cb-4900-98ee-ef9f57428cf2) ### ✔️ Expected Behavior The last answer node outputing the llm result should be in streaming mode, even the mid line merges two there is no way to block the streaming answer. ### ❌ Actual Behavior Actually, the final red node answer is in blocking mode.
yindo added the 🌊 feat:workflow label 2026-02-21 19:06:18 -05:00
yindo closed this issue 2026-02-21 19:06:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 26, 2025):

I found a relevant discussion that might be related to your issue: Non-Streaming Output from LLM Model in Dify Usage, which is currently unsolved [1].

Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR #12105. To resolve this, ensure you are using the latest version of Dify that includes this fix [2][3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 26, 2025): <!-- Answer --> I found a relevant discussion that might be related to your issue: [Non-Streaming Output from LLM Model in Dify Usage](https://github.com/langgenius/dify/discussions/12393), which is currently unsolved <sup>[[1]](https://github.com/langgenius/dify/discussions/12393)</sup>. Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR #12105. To resolve this, ensure you are using the latest version of Dify that includes this fix <sup>[[2]](https://github.com/langgenius/dify/issues/11985)</sup><sup>[[3]](https://github.com/langgenius/dify/issues/12068)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=other)</sup>
Author
Owner

@Halfknow commented on GitHub (Mar 26, 2025):

I found a relevant discussion that might be related to your issue: Non-Streaming Output from LLM Model in Dify Usage, which is currently unsolved [1].

Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR #12105. To resolve this, ensure you are using the latest version of Dify that includes this fix [2][3].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

I've seen the related issues #12362, the pr you mentioned #12105 just address the problem encountered in the situation of one if-else with two answer nodes. Multi if-else branches blocking the streaming answer is still not fixed like #13264. But these are both not the same as the situation I encountered.

@Halfknow commented on GitHub (Mar 26, 2025): > I found a relevant discussion that might be related to your issue: [Non-Streaming Output from LLM Model in Dify Usage](https://github.com/langgenius/dify/discussions/12393), which is currently unsolved [[1]](https://github.com/langgenius/dify/discussions/12393). > > Regarding your issue, Dify handles node merging in workflows, and specific configurations can lead to blocking of streaming outputs. This can occur when using 'if else' nodes in combination with answer nodes. However, this issue has been addressed in a recent update through PR [#12105](https://github.com/langgenius/dify/pull/12105). To resolve this, ensure you are using the latest version of Dify that includes this fix [[2]](https://github.com/langgenius/dify/issues/11985)[[3]](https://github.com/langgenius/dify/issues/12068). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/80bacd74-d33e-406b-9834-ef47b83076f1?feedback_type=other) I've seen the related issues #12362, the pr you mentioned #12105 just address the problem encountered in the situation of one if-else with two answer nodes. Multi if-else branches blocking the streaming answer is still not fixed like #13264. But these are both not the same as the situation I encountered.
Author
Owner

@ft4710403 commented on GitHub (Mar 27, 2025):

me too ~

@ft4710403 commented on GitHub (Mar 27, 2025): me too ~
Author
Owner

@ft4710403 commented on GitHub (Mar 27, 2025):

我找到一个解决方法,把流输出有问题的节点,套在一个循环组件里面,只循环1次,在里面放入llm和回复组件,即可恢复正常的流输出~~~

Image

@ft4710403 commented on GitHub (Mar 27, 2025): 我找到一个解决方法,把流输出有问题的节点,套在一个循环组件里面,只循环1次,在里面放入llm和回复组件,即可恢复正常的流输出~~~ ![Image](https://github.com/user-attachments/assets/cee6e46c-ea76-457a-beae-38d4f9f5ba76)
Author
Owner

@ft4710403 commented on GitHub (Mar 27, 2025):

哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题

@ft4710403 commented on GitHub (Mar 27, 2025): 哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题
Author
Owner

@Halfknow commented on GitHub (Mar 28, 2025):

哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题

Oh, thanks!! That works for me.

@Halfknow commented on GitHub (Mar 28, 2025): > 哈哈,折腾了两天,试出来的~套到一个循环里面,完美解决不能流输出的问题 Oh, thanks!! That works for me.
Author
Owner

@hubutui commented on GitHub (Apr 27, 2025):

不然试试不要合并,保持一棵树。

@hubutui commented on GitHub (Apr 27, 2025): 不然试试不要合并,保持一棵树。
Author
Owner

@SSebo commented on GitHub (May 12, 2025):

I encounter the same problem. LLM stream output need node in self.rest_node_ids, and node is actually removed after common prerequisite branch node is executed. Should change answer_stream_processor.py code to solve this

@SSebo commented on GitHub (May 12, 2025): I encounter the same problem. LLM stream output need node in [self.rest_node_ids](https://github.com/langgenius/dify/blob/14cd71ed0adbd60e1a51cd67f30572a3b650fefe/api/core/workflow/nodes/answer/answer_stream_processor.py#L42C16-L53C32), and node is actually [removed](https://github.com/langgenius/dify/blob/14cd71ed0adbd60e1a51cd67f30572a3b650fefe/api/core/workflow/nodes/answer/base_stream_processor.py#L23) after common prerequisite branch node is executed. Should change `answer_stream_processor.py` code to solve this
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12195