Non-standard model outputs: Optimizing handling of 'data: ' fields #10342

Closed
opened 2026-02-21 18:45:44 -05:00 by yindo · 0 comments
Owner

Originally created by @starweavingdream on GitHub (Mar 11, 2025).

Originally assigned to: @starweavingdream on GitHub.

Self Checks

  • 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.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

When DIFY processes model outputs, some models with non-standard output formats may generate errors, such as the "Tianyi Cloud Xirang Model." By default, DIFY expects the output to start with "data: ", but the output format of the "Tianyi Cloud Xirang Model" is "data:" (note the absence of a space after "data:"). The standard format "data: " includes a space, whereas non-standard formats may omit it. In versions prior to 1.0, I manually modified the code in llm_generator.py to ensure compatibility. However, in versions after 1.0, the official release removed this part of the code and moved it to a plugin written in Go. Below is the trial address for the non-standard format model: https://www.ctyun.cn/act/xirang/deepseek. If possible, we hope that compatibility can be maintained for such cases. Looking forward to your response.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @starweavingdream on GitHub (Mar 11, 2025). Originally assigned to: @starweavingdream on GitHub. ### Self Checks - [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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. When DIFY processes model outputs, some models with non-standard output formats may generate errors, such as the "Tianyi Cloud Xirang Model." By default, DIFY expects the output to start with "data: ", but the output format of the "Tianyi Cloud Xirang Model" is "data:" (note the absence of a space after "data:"). The standard format "data: " includes a space, whereas non-standard formats may omit it. In versions prior to 1.0, I manually modified the code in llm_generator.py to ensure compatibility. However, in versions after 1.0, the official release removed this part of the code and moved it to a plugin written in Go. Below is the trial address for the non-standard format model: https://www.ctyun.cn/act/xirang/deepseek. If possible, we hope that compatibility can be maintained for such cases. Looking forward to your response. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo closed this issue 2026-02-21 18:45:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#10342