Dify does not display reasoning process when using latest Ollama (thinking field not parsed) #20126

Open
opened 2026-02-21 20:05:57 -05:00 by yindo · 7 comments
Owner

Originally created by @xiaopeng1995n on GitHub (Nov 4, 2025).

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

all

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

🧩 Description

After upgrading to the latest versions of Dify (v1.10.x) and Ollama (>= 0.1.47), the reasoning or “thinking” process of models like Qwen3 and DeepSeek-R1 no longer appears in Dify’s UI.
However, when connecting to an older version of Ollama (≤ 0.1.45), the reasoning process displays correctly — which suggests that Dify currently doesn’t parse the new response format from Ollama.

🔍 Steps to Reproduce

Run the latest Ollama (≥ 0.1.47) locally, e.g. ollama run qwen3:32b

Connect Dify (v1.10.x) to Ollama via langgenius/ollama provider

Send a normal chat request to a reasoning-capable model (Qwen3, DeepSeek-R1, etc.)

Observe the streaming output in browser console or Dify logs

Only final “response” is shown — the reasoning (“thinking”) is missing

🧠 Expected Behavior

Dify should display the reasoning process (“thinking”) from models that support it — just like it does when using older Ollama versions or when the model outputs reasoning_content.

⚙️ Actual Behavior

Dify currently does not show any reasoning text.
The Ollama API response clearly includes the reasoning tokens under a new field:

{"thinking": "I should analyze the question...", "response": "", "done": false}
{"response": "The answer is 42.", "done": false}

Older versions of Ollama used to embed both reasoning and final text in:

{"response": "Thinking... The answer is 42.", "done": false}

🧾 Analysis

Ollama changed its streaming output schema since v0.1.47:
thinking and response are now separated.

Dify’s current ollama provider and frontend parsing logic only handle:

response

(optionally) reasoning_content

Therefore, the new "thinking" field is ignored and not rendered.

💡 Suggested Fix

Detect "thinking" field in Ollama plugin backend and map it to reasoning_content,
so that the frontend can display it consistently.

Alternatively, update the frontend to handle both fields:

reasoning = chunk.reasoning_content || chunk.thinking;

✔️ Expected Behavior

Detect "thinking" field in Ollama plugin backend and map it to reasoning_content,
so that the frontend can display it consistently.

Alternatively, update the frontend to handle both fields:

reasoning = chunk.reasoning_content || chunk.thinking;

Actual Behavior

No response

Originally created by @xiaopeng1995n on GitHub (Nov 4, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version all ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 🧩 Description After upgrading to the latest versions of Dify (v1.10.x) and Ollama (>= 0.1.47), the reasoning or “thinking” process of models like Qwen3 and DeepSeek-R1 no longer appears in Dify’s UI. However, when connecting to an older version of Ollama (≤ 0.1.45), the reasoning process displays correctly — which suggests that Dify currently doesn’t parse the new response format from Ollama. 🔍 Steps to Reproduce Run the latest Ollama (≥ 0.1.47) locally, e.g. ollama run qwen3:32b Connect Dify (v1.10.x) to Ollama via langgenius/ollama provider Send a normal chat request to a reasoning-capable model (Qwen3, DeepSeek-R1, etc.) Observe the streaming output in browser console or Dify logs Only final “response” is shown — the reasoning (“thinking”) is missing 🧠 Expected Behavior Dify should display the reasoning process (“thinking”) from models that support it — just like it does when using older Ollama versions or when the model outputs reasoning_content. ⚙️ Actual Behavior Dify currently does not show any reasoning text. The Ollama API response clearly includes the reasoning tokens under a new field: {"thinking": "I should analyze the question...", "response": "", "done": false} {"response": "The answer is 42.", "done": false} Older versions of Ollama used to embed both reasoning and final text in: {"response": "Thinking... The answer is 42.", "done": false} 🧾 Analysis Ollama changed its streaming output schema since v0.1.47: thinking and response are now separated. Dify’s current ollama provider and frontend parsing logic only handle: response (optionally) reasoning_content Therefore, the new "thinking" field is ignored and not rendered. 💡 Suggested Fix Detect "thinking" field in Ollama plugin backend and map it to reasoning_content, so that the frontend can display it consistently. Alternatively, update the frontend to handle both fields: reasoning = chunk.reasoning_content || chunk.thinking; ### ✔️ Expected Behavior Detect "thinking" field in Ollama plugin backend and map it to reasoning_content, so that the frontend can display it consistently. Alternatively, update the frontend to handle both fields: reasoning = chunk.reasoning_content || chunk.thinking; ### ❌ Actual Behavior _No response_
yindo added the stale label 2026-02-21 20:05:57 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 4, 2025):

Hi @xiaopeng1995n! I'm Dosu and I’m helping the dify team.

Dify currently does not parse or display the 'thinking' field from Ollama's streaming responses (v0.1.47+), which is why reasoning steps are missing in the UI. The backend only processes the 'response' field and ignores 'thinking', so reasoning content is not forwarded to the frontend or mapped to reasoning_content as expected.

Recent updates added support for reasoning format configuration and a reasoning_content field in the UI and backend, but the Ollama provider still needs to be updated to detect and map the 'thinking' field from Ollama's API responses to reasoning_content for proper display. You can see the relevant backend logic here.

To resolve this, the Ollama provider should be modified to extract the 'thinking' field from each response chunk and include it in the output as reasoning_content. Once this is done, the frontend will be able to display the reasoning process as intended. For more details on reasoning format support and configuration, see the merged PRs #23313 and #26648.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 4, 2025): <!-- Greeting --> Hi @xiaopeng1995n! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> Dify currently does not parse or display the 'thinking' field from Ollama's streaming responses (v0.1.47+), which is why reasoning steps are missing in the UI. The backend only processes the 'response' field and ignores 'thinking', so reasoning content is not forwarded to the frontend or mapped to `reasoning_content` as expected. Recent updates added support for reasoning format configuration and a `reasoning_content` field in the UI and backend, but the Ollama provider still needs to be updated to detect and map the 'thinking' field from Ollama's API responses to `reasoning_content` for proper display. You can see the relevant backend logic [here](https://github.com/langgenius/dify-official-plugins/blob/e57ae040fb8589eb00455ad825ccd4f716921b9f/models/ollama/models/llm/llm.py#L304-L413). To resolve this, the Ollama provider should be modified to extract the 'thinking' field from each response chunk and include it in the output as `reasoning_content`. Once this is done, the frontend will be able to display the reasoning process as intended. For more details on reasoning format support and configuration, see the merged PRs [#23313](https://github.com/langgenius/dify/pull/23313) and [#26648](https://github.com/langgenius/dify/pull/26648). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/88c10333-f317-44d5-8ab4-fda354de7e95?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/27819)
Author
Owner

@xiaopeng1995n commented on GitHub (Nov 4, 2025):

这是来自QQ邮箱的假期自动回复邮件。
 
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

@xiaopeng1995n commented on GitHub (Nov 4, 2025): 这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Author
Owner

@dosubot[bot] commented on GitHub (Dec 8, 2025):

Hi, @xiaopeng1995n. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that after upgrading Dify and Ollama, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 stopped displaying.
  • The root cause is that Dify's backend currently ignores the new "thinking" field in Ollama's response format and only processes the "response" field.
  • The Ollama provider in Dify needs to be updated to extract the "thinking" field and map it to reasoning_content for proper UI display.
  • You acknowledged this explanation but mentioned you were on vacation and would reply after returning.

Next Steps:

  • Please let me know if this issue is still relevant with the latest versions of Dify and Ollama by commenting here.
  • If I do not hear back within 15 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Dec 8, 2025): Hi, @xiaopeng1995n. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that after upgrading Dify and Ollama, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 stopped displaying. - The root cause is that Dify's backend currently ignores the new "thinking" field in Ollama's response format and only processes the "response" field. - The Ollama provider in Dify needs to be updated to extract the "thinking" field and map it to `reasoning_content` for proper UI display. - You acknowledged this explanation but mentioned you were on vacation and would reply after returning. **Next Steps:** - Please let me know if this issue is still relevant with the latest versions of Dify and Ollama by commenting here. - If I do not hear back within 15 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@xiaopeng1995n commented on GitHub (Dec 8, 2025):

这是来自QQ邮箱的假期自动回复邮件。
 
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

@xiaopeng1995n commented on GitHub (Dec 8, 2025): 这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Author
Owner

@dosubot[bot] commented on GitHub (Jan 8, 2026):

Hi, @xiaopeng1995n. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that after updating to Dify v1.10.x and Ollama ≥ 0.1.47, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 no longer displays.
  • The root cause is that Dify's backend currently only processes the "response" field and does not parse Ollama's new "thinking" field.
  • An update is needed to extract and map the "thinking" field to reasoning_content for proper UI display.
  • You acknowledged this and mentioned you would respond after your vacation.
  • I have marked the issue as stale pending your further updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I do not hear back within 15 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jan 8, 2026): Hi, @xiaopeng1995n. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that after updating to Dify v1.10.x and Ollama ≥ 0.1.47, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 no longer displays. - The root cause is that Dify's backend currently only processes the "response" field and does not parse Ollama's new "thinking" field. - An update is needed to extract and map the "thinking" field to `reasoning_content` for proper UI display. - You acknowledged this and mentioned you would respond after your vacation. - I have marked the issue as stale pending your further updates. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I do not hear back within 15 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@xiaopeng1995n commented on GitHub (Jan 8, 2026):

这是来自QQ邮箱的假期自动回复邮件。
 
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

@xiaopeng1995n commented on GitHub (Jan 8, 2026): 这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Author
Owner

@dosubot[bot] commented on GitHub (Feb 8, 2026):

Hi, @xiaopeng1995n. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that after updating to Dify v1.10.x and Ollama ≥ 0.1.47, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 stopped displaying.
  • The root cause is that Dify's backend currently does not parse Ollama's new "thinking" field, only the "response" field.
  • A Dify team member confirmed the need to update the Ollama provider to extract and map the "thinking" field to reasoning_content for proper UI display.
  • You acknowledged this explanation and mentioned you would respond after your vacation.
  • The issue remains unresolved and I have marked it as stale pending further updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 8, 2026): Hi, @xiaopeng1995n. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that after updating to Dify v1.10.x and Ollama ≥ 0.1.47, the reasoning ("thinking") process from models like Qwen3 and DeepSeek-R1 stopped displaying. - The root cause is that Dify's backend currently does not parse Ollama's new "thinking" field, only the "response" field. - A Dify team member confirmed the need to update the Ollama provider to extract and map the "thinking" field to `reasoning_content` for proper UI display. - You acknowledged this explanation and mentioned you would respond after your vacation. - The issue remains unresolved and I have marked it as stale pending further updates. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20126