reason content are mixed in response content #12096

Closed
opened 2026-02-21 19:05:44 -05:00 by yindo · 1 comment
Owner

Originally created by @NiuBlibing on GitHub (Mar 25, 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.1.3

Cloud or Self Hosted

Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

  1. set qwq-32b reason model
  2. create a chat flow
  3. use llm output as regex input

✔️ Expected Behavior

only content is pass to regex

Actual Behavior

reasoning content is pass to regex

Image

Originally created by @NiuBlibing on GitHub (Mar 25, 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.1.3 ### Cloud or Self Hosted Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce 1. set qwq-32b reason model 2. create a chat flow 3. use llm output as regex input ### ✔️ Expected Behavior only content is pass to regex ### ❌ Actual Behavior reasoning content is pass to regex ![Image](https://github.com/user-attachments/assets/e7c0737a-9433-46de-9446-2c2194474ddf)
yindo added the 🐞 bug label 2026-02-21 19:05:44 -05:00
yindo closed this issue 2026-02-21 19:05:44 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 25, 2025):

In Dify version 1.1.3, the issue of reasoning content being mixed with response content in LLM outputs is known. For version 0.15.3 and above, the separation of content and reasoning content is automatically handled using HTML details tags. However, there is currently no way to prevent the thinking information from appearing in API responses in version 0.15.3. This issue is expected to be addressed in the next version release, where the fix will move think tag rendering from the backend to the frontend to prevent HTML tags from being inserted into API response content [1][2].

For your specific case with the QwQ-32B model, you might need to implement a custom solution to filter out the reasoning content before passing the output to regex processing. This could involve parsing the output to remove or ignore sections marked as reasoning content.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 25, 2025): <!-- Answer --> In Dify version 1.1.3, the issue of reasoning content being mixed with response content in LLM outputs is known. For version 0.15.3 and above, the separation of content and reasoning content is automatically handled using HTML details tags. However, there is currently no way to prevent the thinking information from appearing in API responses in version 0.15.3. This issue is expected to be addressed in the next version release, where the fix will move think tag rendering from the backend to the frontend to prevent HTML tags from being inserted into API response content <sup>[[1]](https://github.com/langgenius/dify/issues/14762)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/14479)</sup>. For your specific case with the QwQ-32B model, you might need to implement a custom solution to filter out the reasoning content before passing the output to regex processing. This could involve parsing the output to remove or ignore sections marked as reasoning content. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3e7aee55-10a1-4ab8-a34d-0bef78ce0c57?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12096