[GH-ISSUE #11545] think=true is not working if format is provided #33377

Closed
opened 2026-04-22 15:58:02 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @jramnai on GitHub (Jul 27, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11545

What is the issue?

When think=true is set along with format, Ollama produces output without thinking.

  • Ollama version:
$ ollama -v
ollama version is 0.9.6
  • OS details:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal
  • Example when only think=true is passed (which is also true by default):
$ ollama run deepseek-r1 --think=true
>>> ollama is 22, busy saving the world
Thinking...
First, the user said: "ollama is 22, busy saving the world." This seems like a playful or sarcastic statement. Ollama might be referring to something or someone I'm not familiar with initially.

...
...

But I think for this response, I'll treat it as a fun statement and respond in kind.
...done thinking.

Haha, that's adorable! If Ollama (the software) is 22 years old by your timeline—let's say born around 2002—I guess we can consider you all "adult" users now. 😉 But don't worry, Ollama isn't 
actually sentient or burdened with world-saving duties; it's just a tool to run and interact with AI models locally.

That said, I'm here and ready to help! Saving the world one problem at a time—what can you work on today? If this is about something specific with Ollama (like code generation, model running, or 
anything else), let me know more details. Otherwise, feel free to bounce around ideas—I'm all ears!

>>> Send a message (/? for help)

Notice the output, model has done thinking and then produced the output.

  • Example when think=true is passed along with format:
$ ollama run deepseek-r1 --format='{"type": "object", "properties": {"age": {"type": "integer"}, "available": {"type": "boolean"}}, "required": ["age", "available"]}' --think=true
>>> ollama is 22, busy saving the world
{

{

  "age": 22,
  "available": false
}

>>> Send a message (/? for help)

Notice the output, model has produced the output without thinking.

I noticed the same behavior with the /api/chat endpoint, and its output closely resembles the command line.

Relevant log output


OS

Linux

GPU

No response

CPU

Intel

Ollama version

0.9.6

Originally created by @jramnai on GitHub (Jul 27, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11545 ### What is the issue? When `think=true` is set along with `format`, Ollama produces output without thinking. - Ollama version: ``` $ ollama -v ollama version is 0.9.6 ``` - OS details: ``` $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal ``` - Example when only `think=true` is passed (which is also true by default): ``` $ ollama run deepseek-r1 --think=true >>> ollama is 22, busy saving the world Thinking... First, the user said: "ollama is 22, busy saving the world." This seems like a playful or sarcastic statement. Ollama might be referring to something or someone I'm not familiar with initially. ... ... But I think for this response, I'll treat it as a fun statement and respond in kind. ...done thinking. Haha, that's adorable! If Ollama (the software) is 22 years old by your timeline—let's say born around 2002—I guess we can consider you all "adult" users now. 😉 But don't worry, Ollama isn't actually sentient or burdened with world-saving duties; it's just a tool to run and interact with AI models locally. That said, I'm here and ready to help! Saving the world one problem at a time—what can you work on today? If this is about something specific with Ollama (like code generation, model running, or anything else), let me know more details. Otherwise, feel free to bounce around ideas—I'm all ears! >>> Send a message (/? for help) ``` Notice the output, model has done thinking and then produced the output. - Example when `think=true` is passed along with `format`: ``` $ ollama run deepseek-r1 --format='{"type": "object", "properties": {"age": {"type": "integer"}, "available": {"type": "boolean"}}, "required": ["age", "available"]}' --think=true >>> ollama is 22, busy saving the world { { "age": 22, "available": false } >>> Send a message (/? for help) ``` Notice the output, model has produced the output without thinking. I noticed the same behavior with the `/api/chat` endpoint, and its output closely resembles the command line. ### Relevant log output ```shell ``` ### OS Linux ### GPU _No response_ ### CPU Intel ### Ollama version 0.9.6
GiteaMirror added the bug label 2026-04-22 15:58:02 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 27, 2025):

#10538

<!-- gh-comment-id:3124394989 --> @rick-github commented on GitHub (Jul 27, 2025): #10538
Author
Owner

@pdevine commented on GitHub (Jul 28, 2025):

Closing this as a dupe. cc @drifkin

<!-- gh-comment-id:3128565674 --> @pdevine commented on GitHub (Jul 28, 2025): Closing this as a dupe. cc @drifkin
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33377