There is no think tag in the information returned by the LLM component, only details. #8790

Closed
opened 2026-02-21 18:27:37 -05:00 by yindo · 4 comments
Owner

Originally created by @hecter-java-architect on GitHub (Mar 1, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

✔️ Expected Behavior

可以返回

Actual Behavior

和0.5.3一样,还是返回的

Originally created by @hecter-java-architect on GitHub (Mar 1, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/68da69de-8e8d-4158-97ce-afdb9b1d212c) ![Image](https://github.com/user-attachments/assets/1f48d3fc-177e-4472-b614-f68d734ff83a) ### ✔️ Expected Behavior 可以返回</think> ### ❌ Actual Behavior 和0.5.3一样,还是返回的</details>
yindo added the 🐞 bug label 2026-02-21 18:27:37 -05:00
yindo closed this issue 2026-02-21 18:27:37 -05:00
Author
Owner

@hecter-java-architect commented on GitHub (Mar 1, 2025):

Model vendors have tried deepseek and OpenAI-API-compatible,The result is the same

@hecter-java-architect commented on GitHub (Mar 1, 2025): Model vendors have tried deepseek and OpenAI-API-compatible,The result is the same
Author
Owner

@hecter-java-architect commented on GitHub (Mar 1, 2025):

Image
In my api,the think tag can return normally

@hecter-java-architect commented on GitHub (Mar 1, 2025): ![Image](https://github.com/user-attachments/assets/da7cdd01-22d8-473d-9426-f835195a8090) In my api,the think tag can return normally
Author
Owner

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

@hecter-java-architect 你好! 我是Dosu,一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的过程中帮助你。

The issue you're experiencing with the missing "think" tag in the information returned by the LLM component is related to a known limitation in Dify. The rendering of the "think" tag has been moved from the backend to the frontend to prevent HTML tags from being inserted into the API response content. This change was implemented in a recent update, and the functionality is not yet fully supported across all providers, including the DeepSeek models you are using [1][2].

In the frontend, the preprocessThinkTag function in the web/app/components/base/markdown.tsx file is responsible for transforming the <think> tag into a format that can be rendered correctly. This ensures that the tag is processed and displayed properly in the UI [3].

The functionality has been restored in a recent pull request and will be available in the next version release after v0.15.3. You will need to wait for this update to see the <think> tag included in the responses [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 1, 2025): <!-- Greeting --> @hecter-java-architect 你好! 我是[Dosu](https://dosu.dev),一个可以帮助你解决 bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的过程中帮助你。 <!-- Answer --> The issue you're experiencing with the missing "think" tag in the information returned by the LLM component is related to a known limitation in Dify. The rendering of the "think" tag has been moved from the backend to the frontend to prevent HTML tags from being inserted into the API response content. This change was implemented in a recent update, and the functionality is not yet fully supported across all providers, including the DeepSeek models you are using <sup>[[1]](https://github.com/langgenius/dify/issues/13419)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/13621)</sup>. In the frontend, the `preprocessThinkTag` function in the `web/app/components/base/markdown.tsx` file is responsible for transforming the `<think>` tag into a format that can be rendered correctly. This ensures that the tag is processed and displayed properly in the UI <sup>[[3]](https://github.com/langgenius/dify/blob/main/web/app/components/base/markdown.tsx)</sup>. The functionality has been restored in a recent pull request and will be available in the next version release after v0.15.3. You will need to wait for this update to see the `<think>` tag included in the responses <sup>[[2]](https://github.com/langgenius/dify/issues/13621)</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/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bb824b5f-b782-424a-b4db-b220f6b4bbd1?feedback_type=other)</sup>
Author
Owner

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

Close due to #1542, also duplicated

@crazywoola commented on GitHub (Mar 1, 2025): Close due to #1542, also duplicated
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8790