mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[BUG] plugin_daemon fails to parse stream response from OpenAI Compatible model (e.g., Xinference), resulting in empty answer in Dify frontend #712
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @simons19920101 on GitHub (Oct 14, 2025).
Self Checks
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.
✔️ 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
@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):
just change ' "stream_mode_delimiter": "\n",' . i solved this problem.
@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:
Next Steps:
Thank you for your understanding and contribution!