When using local deployment dify, calling vllm deployment returns no streaming #405

Closed
opened 2026-02-16 10:19:19 -05:00 by yindo · 1 comment
Owner

Originally created by @froukee on GitHub (Jun 27, 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

1.4.2;1.5.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I have two dify servers deployed locally and on the cloud, both are 1.4.2. When I use the vllm plugin and the OpenAI-API-compatible plugin to call the model deployed locally, there is no streaming return at the end node, whether it is the workflow or the dialogue flow. I upgraded the local server to 1.5.0 and it still happend. At the same time, I tested the code calling interface and the dify cloud service, and both returned streaming normally. Is there any solution or how can I further locate the problem?

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @froukee on GitHub (Jun 27, 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 1.4.2;1.5.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I have two dify servers deployed locally and on the cloud, both are 1.4.2. When I use the vllm plugin and the OpenAI-API-compatible plugin to call the model deployed locally, there is no streaming return at the end node, whether it is the workflow or the dialogue flow. I upgraded the local server to 1.5.0 and it still happend. At the same time, I tested the code calling interface and the dify cloud service, and both returned streaming normally. Is there any solution or how can I further locate the problem? ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:19:19 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 27, 2025):

Streaming support in Dify is always enabled at the application level for OpenAI-compatible providers like vllm, and the codebase passes the streaming option all the way through the stack—there are no toggles or config options that would disable it in Docker or self-hosted setups. Since streaming works with the cloud service and direct API calls, but not in your local Docker deployment, this almost always points to an environment or deployment issue rather than a Dify bug or config problem.

Common causes include reverse proxy buffering (Nginx, Traefik, etc.), Docker networking, or WSGI/gunicorn settings that interfere with HTTP chunked responses or Server-Sent Events. Check if your local setup has any proxies or load balancers in front of Dify or vllm, and make sure buffering is disabled for streaming endpoints. Also, verify that your vllm endpoint is actually returning chunked responses when accessed through Docker and any proxies.

To further isolate the problem, try:

  • Using curl --no-buffer or browser dev tools to watch the network response and see if chunks arrive or if the response is buffered.
  • Comparing your Docker and cloud setups for differences in proxy, network, or container config.
  • Checking logs for any errors or warnings related to streaming or connection handling.

If you can share logs, network traces, or config snippets from your local deployment, I can help you dig deeper.

For reference, here’s how streaming is handled in the code: the response_mode parameter controls streaming, and it’s passed through the API controller, service layer, and model client, which always enables streaming if requested. The plugin client sends requests to the plugin daemon with streaming enabled, and there’s no code path that disables this in Docker or self-hosted mode. So, focus on the deployment environment and network/proxy layers for the root cause.
See code details

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 27, 2025): <!-- Answer --> Streaming support in Dify is always enabled at the application level for OpenAI-compatible providers like vllm, and the codebase passes the streaming option all the way through the stack—there are no toggles or config options that would disable it in Docker or self-hosted setups. Since streaming works with the cloud service and direct API calls, but not in your local Docker deployment, this almost always points to an environment or deployment issue rather than a Dify bug or config problem. Common causes include reverse proxy buffering (Nginx, Traefik, etc.), Docker networking, or WSGI/gunicorn settings that interfere with HTTP chunked responses or Server-Sent Events. Check if your local setup has any proxies or load balancers in front of Dify or vllm, and make sure buffering is disabled for streaming endpoints. Also, verify that your vllm endpoint is actually returning chunked responses when accessed through Docker and any proxies. To further isolate the problem, try: - Using `curl --no-buffer` or browser dev tools to watch the network response and see if chunks arrive or if the response is buffered. - Comparing your Docker and cloud setups for differences in proxy, network, or container config. - Checking logs for any errors or warnings related to streaming or connection handling. If you can share logs, network traces, or config snippets from your local deployment, I can help you dig deeper. For reference, here’s how streaming is handled in the code: the `response_mode` parameter controls streaming, and it’s passed through the API controller, service layer, and model client, which always enables streaming if requested. The plugin client sends requests to the plugin daemon with streaming enabled, and there’s no code path that disables this in Docker or self-hosted mode. So, focus on the deployment environment and network/proxy layers for the root cause. [See code details](https://github.com/langgenius/dify/blob/37e19de7ab3d8c1ffd8dfd8b789ff52b47f981cb/api/core/plugin/impl/model.py) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4a3cdaab-f4a0-47c2-8e24-66596dd2d320?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21642)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#405