Dify plugin sdk streaming output method interrupt when calling chaflow #52

Open
opened 2026-02-15 21:15:27 -05:00 by yindo · 2 comments
Owner

Originally created by @flanders002 on GitHub (Aug 20, 2025).

使用应用市场的一个插件调用chatflow,这个chatflow有多个直接回复的输出节点;现在遇到一个问题,前一个流式响应总是会被截断,然后等到下一个节点的输出开始后前一个节点的剩余内容才会返回;如图:

Image

在本地调试插件,发现后台已经把完整的输出打印出来,但是前台的流式响应一直卡着:

Image

而且查看前端run接口返回,可以发现明显的流式输出截断情况,接口的data json结构不完整,处于截断状态,直到随着下一个耗时较久的llm节点完成而返回:

Image

这个插件的实现逻辑是流式调用chatflow的url,然后使用sdk的create_stream_variable_message方法返回。

Image

所以这个create_stream_variable_message内部是否有一些异常机制,导致了中断情况?

Originally created by @flanders002 on GitHub (Aug 20, 2025). 使用应用市场的一个插件调用chatflow,这个chatflow有多个直接回复的输出节点;现在遇到一个问题,前一个流式响应总是会被截断,然后等到下一个节点的输出开始后前一个节点的剩余内容才会返回;如图: <img width="1236" height="1339" alt="Image" src="https://github.com/user-attachments/assets/f8e77754-a611-483f-9e8f-3d88b5331c10" /> 在本地调试插件,发现后台已经把完整的输出打印出来,但是前台的流式响应一直卡着: <img width="3824" height="747" alt="Image" src="https://github.com/user-attachments/assets/a432026c-9b5d-40d7-9834-fcff7229dc1c" /> 而且查看前端run接口返回,可以发现明显的流式输出截断情况,接口的data json结构不完整,处于截断状态,直到随着下一个耗时较久的llm节点完成而返回: <img width="1911" height="844" alt="Image" src="https://github.com/user-attachments/assets/86dfd368-f435-4186-80e8-0adc654467c4" /> 这个插件的实现逻辑是流式调用chatflow的url,然后使用sdk的create_stream_variable_message方法返回。 <img width="1461" height="1018" alt="Image" src="https://github.com/user-attachments/assets/256f4981-68d0-4cd4-be4d-9f18b45d4d3e" /> 所以这个create_stream_variable_message内部是否有一些异常机制,导致了中断情况?
yindo added the bug label 2026-02-15 21:15:27 -05:00
Author
Owner

@sysujieting commented on GitHub (Aug 24, 2025):

I met the same question

@sysujieting commented on GitHub (Aug 24, 2025): I met the same question
Author
Owner

@Mairuis commented on GitHub (Dec 9, 2025):

Can you provide the model plugin you are using? I'm trying to reproduce the case.

@Mairuis commented on GitHub (Dec 9, 2025): Can you provide the model plugin you are using? I'm trying to reproduce the case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#52