ollama - 💡(How to fix) Fix [Bug] lfm2.5-thinking:latest — thinking mode cannot be disabled; [1 comments, 2 participants]

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…
GitHub stats
ollama/ollama#14622Fetched 2026-04-08 00:33:40
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1labeled ×1

Code Example

curl http://localhost:11434/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm2.5-thinking:latest",
    "stream": false,
    "options": { "think": false },
    "messages": [
      { "role": "user", "content": "What is 2 + 2?" }
    ]
  }'
{"model":"lfm2.5-thinking:latest","created_at":"2026-03-04T20:18:52.319383911Z","message":{"role":"assistant","content":"The sum of 2 and 2 is simply $2 + 2 = 4$. \n\n\\boxed{4}","thinking":"Okay, let me see. The user asked \"What is 2 + 2?\" Hmm, that seems straightforward, but maybe they want more than just a number. Wait, maybe they're testing if I know basic math? Or perhaps there's a trick here. Let me think.\n\nFirst, 2 plus 2 is a simple arithmetic problem. The answer should be 4. But maybe they expect some deeper answer? Like, in some contexts, 2+2 could symbolize something else? Or maybe it's a play on words? Like \"two plus two\" could be part of a larger question? Wait, the question is just \"What is 2 + 2?\" so probably just 4. \n\nBut let me make sure. If I consider possible contexts: in math class, adding two 2s gives 4. In everyday language, same thing. Unless there's a pun or something. Wait, maybe the user is expecting a different answer? Like, if it's a riddle? For example, \"2 + 2\" could be part of a sentence where it leads to something else. But the question is straightforward. \n\nAlternatively, maybe they want the explanation. Since the user just asked \"What is 2 + 2?\" perhaps they want the answer boxed as 4. Since the instruction says to put the final answer within \\boxed{}, so I should just give 4 in a box. \n\nWait, but maybe I should confirm. Let me check again. If someone asks \"What is 2 + 2?\" the answer is 4. Unless there's a trick, but I can't think of any. So I'll go with 4. Alright, I'll put \\boxed{4}."},"done":true,"done_reason":"stop","total_duration":19064370371,"load_duration":442441364,"prompt_eval_count":17,"prompt_eval_duration":216339639,"eval_count":401,"eval_duration":18312636992}
RAW_BUFFERClick to expand / collapse

Bug : Thinking mode cannot be disabled

There is no way to suppress the <think> block output in lfm2.5-thinking:latest.

Expected: When Ollama parameter think is set to false, the model should not output <think> blocks.

Actual: The model always emits a verbose <think> block on every response. think: 'false' isn't working.

Request: Please add support to disable thinking mode via a model parameter (e.g. think: false in Ollama OPTIONS), or provide a non-thinking variant of the model on Ollama.

Relevant log output

curl http://localhost:11434/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm2.5-thinking:latest",
    "stream": false,
    "options": { "think": false },
    "messages": [
      { "role": "user", "content": "What is 2 + 2?" }
    ]
  }'
{"model":"lfm2.5-thinking:latest","created_at":"2026-03-04T20:18:52.319383911Z","message":{"role":"assistant","content":"The sum of 2 and 2 is simply $2 + 2 = 4$. \n\n\\boxed{4}","thinking":"Okay, let me see. The user asked \"What is 2 + 2?\" Hmm, that seems straightforward, but maybe they want more than just a number. Wait, maybe they're testing if I know basic math? Or perhaps there's a trick here. Let me think.\n\nFirst, 2 plus 2 is a simple arithmetic problem. The answer should be 4. But maybe they expect some deeper answer? Like, in some contexts, 2+2 could symbolize something else? Or maybe it's a play on words? Like \"two plus two\" could be part of a larger question? Wait, the question is just \"What is 2 + 2?\" so probably just 4. \n\nBut let me make sure. If I consider possible contexts: in math class, adding two 2s gives 4. In everyday language, same thing. Unless there's a pun or something. Wait, maybe the user is expecting a different answer? Like, if it's a riddle? For example, \"2 + 2\" could be part of a sentence where it leads to something else. But the question is straightforward. \n\nAlternatively, maybe they want the explanation. Since the user just asked \"What is 2 + 2?\" perhaps they want the answer boxed as 4. Since the instruction says to put the final answer within \\boxed{}, so I should just give 4 in a box. \n\nWait, but maybe I should confirm. Let me check again. If someone asks \"What is 2 + 2?\" the answer is 4. Unless there's a trick, but I can't think of any. So I'll go with 4. Alright, I'll put \\boxed{4}."},"done":true,"done_reason":"stop","total_duration":19064370371,"load_duration":442441364,"prompt_eval_count":17,"prompt_eval_duration":216339639,"eval_count":401,"eval_duration":18312636992}

OS

NAME="Fedora Linux" VERSION="43 (Workstation Edition)"

GPU

No response

CPU

Model name: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz

Ollama version

ollama version is 0.14.3

extent analysis

Fix Plan

To fix the issue, we need to modify the model to respect the think parameter. Here are the steps:

  • Update the model code to check the think parameter in the options object.
  • If think is false, skip generating the <think> block.
  • Example code:
if options.get('think', True):
    # Generate thinking block
    thinking_block = generate_thinking_block()
    response['thinking'] = thinking_block
  • Ensure the generate_thinking_block function is defined and returns the thinking block content.
  • If think is false, the thinking key will not be added to the response.

Verification

To verify the fix, use the following curl command:

curl http://localhost:11434/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lfm2.5-thinking:latest",
    "stream": false,
    "options": { "think": false },
    "messages": [
      { "role": "user", "content": "What is 2 + 2?" }
    ]
  }'

The response should not contain the <think> block.

Extra Tips

  • Make sure to update the model documentation to reflect the new think parameter.
  • Consider adding a default value for the think parameter to ensure backwards compatibility.
  • Test the model with different think values to ensure it behaves as expected.

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

ollama - 💡(How to fix) Fix [Bug] lfm2.5-thinking:latest — thinking mode cannot be disabled; [1 comments, 2 participants]