[GH-ISSUE #10964] When API calls specify think:false, the output is unstable, and sometimes it includes thinking content. #69283

Open
opened 2026-05-04 17:38:56 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @hlstudio on GitHub (Jun 4, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10964

Originally assigned to: @drifkin on GitHub.

What is the issue?

Image

Image

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

0.9.0

Originally created by @hlstudio on GitHub (Jun 4, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10964 Originally assigned to: @drifkin on GitHub. ### What is the issue? ![Image](https://github.com/user-attachments/assets/63248349-5d48-4906-84e6-062d049a5c21) ![Image](https://github.com/user-attachments/assets/7e7c010b-74d4-4044-bc70-48c945e7639d) ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.9.0
GiteaMirror added the bug label 2026-05-04 17:38:56 -05:00
Author
Owner

@rick-github commented on GitHub (Jun 8, 2025):

deepseek-r1 doesn't actually have a no-think mode, so the template tries to fake one for the model by inserting a blank think block at the end of the prompt. It looks like the model recognizes the opening <think>, since it doesn't output a new one, but not the closing </think>, since it writes one out.

Padding the think block with some text helps it recognize the trailing </think>. However, this reduces the quality of the output.

I think for deepseek-r1, the only really valid options for think are unset or true.

<!-- gh-comment-id:2954232406 --> @rick-github commented on GitHub (Jun 8, 2025): deepseek-r1 doesn't actually have a no-think mode, so the template tries to fake one for the model by inserting a blank think block at the end of the prompt. It looks like the model recognizes the opening `<think>`, since it doesn't output a new one, but not the closing `</think>`, since it writes one out. Padding the think block with some text helps it recognize the trailing `</think>`. However, this reduces the quality of the output. I think for deepseek-r1, the only really valid options for `think` are unset or `true`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69283