Using deepseek-r1 returns multiple thinking... #12271

Closed
opened 2026-02-21 19:06:41 -05:00 by yindo · 4 comments
Owner

Originally created by @ouguofeng on GitHub (Mar 27, 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

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The addition of deepseek-r1 using OpenAI-API-compatible often returns multiple thinking... The phenomenon of

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @ouguofeng on GitHub (Mar 27, 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 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The addition of deepseek-r1 using OpenAI-API-compatible often returns multiple thinking... The phenomenon of ![Image](https://github.com/user-attachments/assets/dde6d2b6-93e2-40fc-b86b-62edba323a83) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:06:41 -05:00
yindo closed this issue 2026-02-21 19:06:41 -05:00
Author
Owner

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

The issue you're experiencing with multiple "Thinking..." responses when using deepseek-r1 in a self-hosted environment with Dify version 0.15.3 is a known problem. This occurs due to an incomplete implementation where the <think> tag is not properly returned in the response, leading to segmented "Thinking..." sections. This issue has been addressed in PR #13392, and the fix will be available in versions released after v0.15.3. The rendering of the think tag has been moved to the frontend to prevent HTML tags from being inserted into the API response content [1][2].

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 27, 2025): <!-- Answer --> The issue you're experiencing with multiple "Thinking..." responses when using deepseek-r1 in a self-hosted environment with Dify version 0.15.3 is a known problem. This occurs due to an incomplete implementation where the `<think>` tag is not properly returned in the response, leading to segmented "Thinking..." sections. This issue has been addressed in PR #13392, and the fix will be available in versions released after v0.15.3. The rendering of the think tag has been moved to the frontend to prevent HTML tags from being inserted into the API response content <sup>[[1]](https://github.com/langgenius/dify/issues/14365)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/13419)</sup>. <!-- 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/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=other)</sup>
Author
Owner

@EatingsoilLang commented on GitHub (Mar 27, 2025):

在自托管环境中使用 deepseek-r1 并使用 Dify 版本 0.15.3 时,您遇到的多个“思考...”响应问题是一个已知问题。这是由于实现不完整导致标签<think>未在响应中正确返回,从而导致分段的“思考...”部分。此问题已在 PR #13392中得到解决,修复将在 v0.15.3 之后发布的版本中提供。think 标签的渲染已移至前端,以防止 HTML 标签插入 API 响应内容[1] [2]

要继续与Dosu交谈,请提及@dosu

帮助 Dosu 学习!提供反馈:很好的回应|不相关的答案|不正确的来源|太冗长|幻觉|错误报告|其他

我使用的1.1.2版本,经常遇到只有没有的情况

@EatingsoilLang commented on GitHub (Mar 27, 2025): > 在自托管环境中使用 deepseek-r1 并使用 Dify 版本 0.15.3 时,您遇到的多个“思考...”响应问题是一个已知问题。这是由于实现不完整导致标签`<think>`未在响应中正确返回,从而导致分段的“思考...”部分。此问题已在 PR [#13392](https://github.com/langgenius/dify/pull/13392)中得到解决,修复将在 v0.15.3 之后发布的版本中提供。think 标签的渲染已移至前端,以防止 HTML 标签插入 API 响应内容[[1] ](https://github.com/langgenius/dify/issues/14365)[[2]](https://github.com/langgenius/dify/issues/13419)。 > > _要继续与[Dosu](https://dosu.dev)交谈,请提及[@dosu](https://github.com/dosu)。_ > > 帮助 Dosu 学习!提供反馈:[很好的回应](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=great_response)|[不相关的答案](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=irrelevant_answer)|[不正确的来源](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=incorrect_sources)|[太冗长](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=too_verbose)|[幻觉](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=hallucination)|[错误报告](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=bug_report)|[其他](https://app.dosu.dev/response-feedback/84e849d9-6a45-49ea-abbf-300b86813f35?feedback_type=other) 我使用的1.1.2版本,经常遇到只有<think>没有</think>的情况
Author
Owner

@ouguofeng commented on GitHub (Mar 27, 2025):

我刚准备升级版本,1.1.2都还有这个情况么?

@ouguofeng commented on GitHub (Mar 27, 2025): 我刚准备升级版本,1.1.2都还有这个情况么?
Author
Owner

@crazywoola commented on GitHub (Mar 28, 2025):

This is related to the plugin version. We do encounter this problem in v0.15.3. We have upgraded the plugin version in v1.0.x later.

@crazywoola commented on GitHub (Mar 28, 2025): This is related to the plugin version. We do encounter this problem in v0.15.3. We have upgraded the plugin version in v1.0.x later.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12271