dify - 💡(How to fix) Fix Reasoning <think> content leaks into Chatflow answer in separated mode [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root cause is in the streaming path of the workflow engine (graphon); fix in progress: langgenius/graphon#171.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

  1. In a Chatflow, add an LLM node using a reasoning model (e.g. claude-haiku-4-5, deepseek-r1) with thinking/reasoning enabled.
  2. Enable the LLM node's "Enable reasoning tag separation" toggle (reasoning_format = "separated").
  3. Wire the LLM output straight into the Answer node.
  4. Run the app via the Service API and inspect the returned answer.

✔️ Expected Behavior

With reasoning tag separation enabled, the returned answer contains only the final answer; the <think>...</think> reasoning is stripped (and still available separately as reasoning_content).

❌ Actual Behavior

The answer still contains the raw <think>...</think> reasoning. In separated mode only the final text variable is cleaned; the per-token stream is emitted unfiltered, and Chatflow assembles its answer from that stream — so reasoning leaks through even with the toggle on.

Root cause is in the streaming path of the workflow engine (graphon); fix in progress: langgenius/graphon#171.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING