Can the reasoning process of DeepSeek-R1 be returned individually? #8726

Closed
opened 2026-02-21 18:27:15 -05:00 by yindo · 1 comment
Owner

Originally created by @xiaoqiang1999 on GitHub (Feb 27, 2025).

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.

The current reasoning process returns with the text, and the reasoning process is wrapped by the <details> tag. This will lead to the inability to distinguish between the main text and the inference content, and the inference content cannot be displayed and processed separately.
And when using Dify's TTS speech synthesis function, the <details> tag will be read out, and the individual letters of d, e, t, a, i, l, s,... are read out one by one, which results in the TTS function being basically unavailable on DeepSeek-R1.

Is it possible to return the reasoning content and the body separately?
For example, add a new "think_message" event type, and the return content is reasoning content, so that it can be processed separately.
DeepSeek-R1 itself is also distinguished by the reasoning_content field and returned separately.

现在的推理过程与正文一起返回,推理过程被<details>标签包裹。这样会导致无法区分正文和推理内容,无法对推理内容进行单独展示和处理。
并且在使用Dify的TTS语音合成功能时,会把<details>标签读出,而且是单独的d、e、t、a、i、l、s、…… 分字母逐个读出,这样导致TTS功能在DeepSeek-R1上基本不可用。

是否可以让think内容和正文分开返回?
比如,再新增一个“think_message” event type,返回内容是推理内容,这样就可以分开单独进行处理。
DeepSeek-R1 本身也是通过 reasoning_content 字段区分,分开返回的。

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 @xiaoqiang1999 on GitHub (Feb 27, 2025). ### 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. The current reasoning process returns with the text, and the reasoning process is wrapped by the \<details\> tag. This will lead to the inability to distinguish between the main text and the inference content, and the inference content cannot be displayed and processed separately. And when using Dify's TTS speech synthesis function, the \<details\> tag will be read out, and the individual letters of d, e, t, a, i, l, s,... are read out one by one, which results in the TTS function being basically unavailable on DeepSeek-R1. Is it possible to return the reasoning content and the body separately? For example, add a new "think_message" event type, and the return content is reasoning content, so that it can be processed separately. DeepSeek-R1 itself is also distinguished by the reasoning_content field and returned separately. 现在的推理过程与正文一起返回,推理过程被\<details\>标签包裹。这样会导致无法区分正文和推理内容,无法对推理内容进行单独展示和处理。 并且在使用Dify的TTS语音合成功能时,会把\<details\>标签读出,而且是单独的d、e、t、a、i、l、s、…… 分字母逐个读出,这样导致TTS功能在DeepSeek-R1上基本不可用。 是否可以让think内容和正文分开返回? 比如,再新增一个“think_message” event type,返回内容是推理内容,这样就可以分开单独进行处理。 DeepSeek-R1 本身也是通过 reasoning_content 字段区分,分开返回的。 ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the stt & tts label 2026-02-21 18:27:15 -05:00
yindo closed this issue 2026-02-21 18:27:15 -05:00
Author
Owner

@crazywoola commented on GitHub (Feb 27, 2025):

Duplicated

@crazywoola commented on GitHub (Feb 27, 2025): Duplicated
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8726