[BUG] plugin_daemon fails to parse stream response from OpenAI Compatible model (e.g., Xinference), resulting in empty answer in Dify frontend #712

Closed
opened 2026-02-16 10:20:16 -05:00 by yindo · 3 comments
Owner

Originally created by @simons19920101 on GitHub (Oct 14, 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 Dify issues & Dify Official Plugins, 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

dify1.8.1

Plugin version

dify-plugin-daemon:0.2.0-local

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When using Dify 1.8.1 with an OpenAI API-compatible model provider (e.g., Xinference) configured, the model returns an empty result (answer: "") in the Dify application chat interface, although the model itself is loaded correctly. The page shows a timeout of about 20 seconds and calculates token usage (but completion_tokens is 0), indicating the request was sent to the model service, but the final content was not correctly received or displayed by Dify. Detailed investigation confirms the issue lies in the communication between Dify's plugin_daemon component and Xinference.
Steps to Reproduce:
1.Deploy Dify 1.8.1 offline on a CentOS 7.9 server.
2.Deploy Xinference on the same network environment and successfully load the qwen2.5-instruct model.
3.In Dify's backend, add an "OpenAI API-compatible" model provider.
4.Create a new application and select the configured model.
5.In the application frontend, initiate a conversation (e.g., input "Hello").
6.Observe the result: After several seconds, the page displays the elapsed time and token consumption, but the reply content remains blank. In the F12 developer tools Network panel, the answer field in the chat-messages request response is an empty string.
Behavioral Differences:
Prompt Generator: When using the "Prompt Generator" in Dify's workflow, plugin_daemon sends "stream": false requests and receives standard JSON responses, displaying correctly in the frontend.
Application chat: When chatting in an application, plugin_daemon sends "stream": true requests and receives SSE responses, but the frontend answer is empty.

Image

✔️ Error log

Regardless of the configuration, as long as the connection is to an OpenAI Compatible model service like Xinference, the Dify frontend displays an empty answer.

[Prompt Generator's logs]1.9.txt

Application Chat's logs2.1.txt

Originally created by @simons19920101 on GitHub (Oct 14, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 dify1.8.1 ### Plugin version dify-plugin-daemon:0.2.0-local ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When using Dify 1.8.1 with an OpenAI API-compatible model provider (e.g., Xinference) configured, the model returns an empty result (answer: "") in the Dify application chat interface, although the model itself is loaded correctly. The page shows a timeout of about 20 seconds and calculates token usage (but completion_tokens is 0), indicating the request was sent to the model service, but the final content was not correctly received or displayed by Dify. Detailed investigation confirms the issue lies in the communication between Dify's plugin_daemon component and Xinference. Steps to Reproduce: 1.Deploy Dify 1.8.1 offline on a CentOS 7.9 server. 2.Deploy Xinference on the same network environment and successfully load the qwen2.5-instruct model. 3.In Dify's backend, add an "OpenAI API-compatible" model provider. 4.Create a new application and select the configured model. 5.In the application frontend, initiate a conversation (e.g., input "Hello"). 6.Observe the result: After several seconds, the page displays the elapsed time and token consumption, but the reply content remains blank. In the F12 developer tools Network panel, the answer field in the chat-messages request response is an empty string. Behavioral Differences: Prompt Generator: When using the "Prompt Generator" in Dify's workflow, plugin_daemon sends "stream": false requests and receives standard JSON responses, displaying correctly in the frontend. Application chat: When chatting in an application, plugin_daemon sends "stream": true requests and receives SSE responses, but the frontend answer is empty. <img width="1295" height="697" alt="Image" src="https://github.com/user-attachments/assets/afe3c91d-9779-4fb2-aeb3-7d4e173bbd22" /> ### ✔️ Error log Regardless of the configuration, as long as the connection is to an OpenAI Compatible model service like Xinference, the Dify frontend displays an empty answer. [Prompt Generator's logs][1.9.txt](https://github.com/user-attachments/files/22904415/1.9.txt) Application Chat's logs[2.1.txt](https://github.com/user-attachments/files/22904431/2.1.txt)
yindo added the bug label 2026-02-16 10:20:16 -05:00
yindo closed this issue 2026-02-16 10:20:16 -05:00
Author
Owner

@zhujiaxin commented on GitHub (Oct 25, 2025):

I'm having the same issue, but using vllm directly plugin works fine.

@zhujiaxin commented on GitHub (Oct 25, 2025): I'm having the same issue, but using vllm directly plugin works fine.
Author
Owner

@zhujiaxin commented on GitHub (Oct 25, 2025):

just change ' "stream_mode_delimiter": "\n",' . i solved this problem.

@zhujiaxin commented on GitHub (Oct 25, 2025): just change ' "stream_mode_delimiter": "\n",' . i solved this problem.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 10, 2025):

Hi, @simons19920101. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Dify v1.8.1, the plugin_daemon failed to parse streaming responses from OpenAI-compatible models like Xinference, resulting in empty frontend answers despite token usage.
  • Contributor zhujiaxin confirmed the issue and noted that using the vllm plugin directly worked without problems.
  • A fix was suggested and implemented by changing the "stream_mode_delimiter" to "\n" in the plugin_daemon.
  • This change resolved the parsing issue and the empty answer problem in the frontend.

Next Steps:

  • Please confirm if this fix is still relevant and effective with the latest version of dify-official-plugins by commenting on this issue.
  • If no further updates are provided, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 10, 2025): Hi, @simons19920101. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify v1.8.1, the plugin_daemon failed to parse streaming responses from OpenAI-compatible models like Xinference, resulting in empty frontend answers despite token usage. - Contributor zhujiaxin confirmed the issue and noted that using the vllm plugin directly worked without problems. - A fix was suggested and implemented by changing the "stream_mode_delimiter" to "\n" in the plugin_daemon. - This change resolved the parsing issue and the empty answer problem in the frontend. **Next Steps:** - Please confirm if this fix is still relevant and effective with the latest version of dify-official-plugins by commenting on this issue. - If no further updates are provided, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#712