[GH-ISSUE #11751] /set nothink or --think=false Not working for gpt-oss:20b #69846

Closed
opened 2026-05-04 19:33:01 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @cyperdev on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11751

When using the gpt-oss:20b model, disabling the thinking output using either /set nothink in the console or the --think=false flag does not work. The model continues to generate and/or expose thinking traces despite the flag being passed.

Steps to reproduce:

Run the model with --think=false (or use /set nothink during an interactive session).

Prompt the model as usual.

Observe that it still outputs or behaves as if thinking mode is enabled.

Expected behaviour:

The model should suppress any thinking traces when --think=false is specified or when /set nothink is used.

Actual behaviour:

No change; the model still produces thinking traces or behaves as if think mode is active.

Environment:

Model: gpt-oss:20b

ollama version is 0.11.2
Originally created by @cyperdev on GitHub (Aug 6, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11751 When using the gpt-oss:20b model, disabling the thinking output using either /set nothink in the console or the --think=false flag does not work. The model continues to generate and/or expose thinking traces despite the flag being passed. Steps to reproduce: Run the model with --think=false (or use /set nothink during an interactive session). Prompt the model as usual. Observe that it still outputs or behaves as if thinking mode is enabled. Expected behaviour: The model should suppress any thinking traces when --think=false is specified or when /set nothink is used. Actual behaviour: No change; the model still produces thinking traces or behaves as if think mode is active. Environment: Model: gpt-oss:20b ollama version is 0.11.2
Author
Owner

@AltoRetrato commented on GitHub (Aug 6, 2025):

OpenAI Harmony: OpenAI's response format for its open-weight model series gpt-oss

OpenAI Harmony Response Format: The gpt-oss models were trained on the harmony response format for defining conversation structures, generating reasoning output and structuring function calls.

  • Role: system
  • Purpose: A system message is used to specify reasoning effort, meta information like knowledge cutoff and built-in tools

So it seems you can use the Harmony Response Format to set the reasoning "level" to high, medium, or low.

<!-- gh-comment-id:3161543672 --> @AltoRetrato commented on GitHub (Aug 6, 2025): [OpenAI Harmony](https://github.com/openai/harmony): OpenAI's response format for its open-weight model series [gpt-oss](https://openai.com/open-models) [OpenAI Harmony Response Format](https://cookbook.openai.com/articles/openai-harmony): The [gpt-oss models](https://openai.com/open-models) were trained on the harmony response format for defining conversation structures, generating reasoning output and structuring function calls. - Role: system - Purpose: A system message is used to **specify reasoning effort**, meta information like knowledge cutoff and built-in tools So it seems you can use the **Harmony Response Format** to set the reasoning "level" to `high`, `medium`, or `low`.
Author
Owner

@AltoRetrato commented on GitHub (Aug 6, 2025):

Reasoning: high example

Prompt
<|start|>system<|message|>Reasoning: high<|end|>
<|start|>user<|message|>
Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, 
then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. 
When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. 
Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?”
<|end|><|start|>assistant
Thinking (~1.783 chars)
Thinking...
We have a puzzle: Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living
room, then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. When she comes
back, she picks up the box again and, without opening it, turns it upside-down in the hallway. Then she carries it
to the garage and finally to the backyard. She now asks: “Where is the red ball?” The question seems to test logic
or location tracking. The ball hasn't been opened or removed. She turned the box upside-down but that doesn't
change its contents. So the ball remains inside the box. She carried the box to the backyard. So the ball is in
the backyard, inside the box. So answer: in the backyard in the box. But maybe trick: "She leaves the box there
and goes to the bathroom" might cause ball to fall? But no. The box is closed. So the ball is inside the box. So
answer: The red ball is in the cardboard box in the backyard. But maybe she didn't open it. So ball still inside
the box. So location: backyard. So the answer: In the backyard, inside the cardboard box. So maybe it's still in
the cardboard box. The question might be from a riddle: The red ball remains in the cardboard box and thus in the
backyard. So answer: It's still in the box. So we can answer: The red ball is in the backyard inside the cardboard
box. Or "In the box" if we are asked "Where is the ball?" The answer: In the cardboard box.

But maybe there's something else: She turned it upside-down in the hallway. Could have thrown it? No, she didn't
open it. So ball remains inside. So answer: In the backyard, in the cardboard box.

Therefore answer: In the backyard, inside the cardboard box.

Let's provide that.
...done thinking.
Answer
The red ball is still inside the cardboard box – the box has been carried all the way to the backyard, so the ball
is in the backyard, inside that box.

Reasoning: low example

Prompt
<|start|>system<|message|>Reasoning: low<|end|>
<|start|>user<|message|>
Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, 
then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. 
When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. 
Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?”
<|end|><|start|>assistant
Thinking (~576 chars)
Thinking...
We need to answer the riddle: The ball hasn't been opened or removed; she hasn't opened the box, so the ball
remains inside the box. She turns it upside down but no effect. So the red ball is still in the box. She didn't
open it. So answer: In the box. But maybe trick: She didn't mention opening. So ball still in the cardboard box.
So answer: It's still in the box, wherever the box currently is (backyard). She turned it upside down but didn't
open it. So ball remains. So answer: In the cardboard box in the backyard. Provide reasoning.
...done thinking.
Answer
The ball is still inside the cardboard box.
She never opened the box, so the ball didn’t leave it.
After turning it upside‑down she carried the box to the backyard, so the red ball is there, snug inside the
cardboard box.
<!-- gh-comment-id:3161768422 --> @AltoRetrato commented on GitHub (Aug 6, 2025): **`Reasoning: high` example** <details> <summary>Prompt</summary> ``` <|start|>system<|message|>Reasoning: high<|end|> <|start|>user<|message|> Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?” <|end|><|start|>assistant ``` </details> <details> <summary>Thinking (~1.783 chars)</summary> ``` Thinking... We have a puzzle: Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?” The question seems to test logic or location tracking. The ball hasn't been opened or removed. She turned the box upside-down but that doesn't change its contents. So the ball remains inside the box. She carried the box to the backyard. So the ball is in the backyard, inside the box. So answer: in the backyard in the box. But maybe trick: "She leaves the box there and goes to the bathroom" might cause ball to fall? But no. The box is closed. So the ball is inside the box. So answer: The red ball is in the cardboard box in the backyard. But maybe she didn't open it. So ball still inside the box. So location: backyard. So the answer: In the backyard, inside the cardboard box. So maybe it's still in the cardboard box. The question might be from a riddle: The red ball remains in the cardboard box and thus in the backyard. So answer: It's still in the box. So we can answer: The red ball is in the backyard inside the cardboard box. Or "In the box" if we are asked "Where is the ball?" The answer: In the cardboard box. But maybe there's something else: She turned it upside-down in the hallway. Could have thrown it? No, she didn't open it. So ball remains inside. So answer: In the backyard, in the cardboard box. Therefore answer: In the backyard, inside the cardboard box. Let's provide that. ...done thinking. ``` </details> <details> <summary>Answer</summary> ``` The red ball is still inside the cardboard box – the box has been carried all the way to the backyard, so the ball is in the backyard, inside that box. ``` </details> **`Reasoning: low` example** <details> <summary>Prompt</summary> ``` <|start|>system<|message|>Reasoning: low<|end|> <|start|>user<|message|> Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?” <|end|><|start|>assistant ``` </details> <details> <summary>Thinking (~576 chars)</summary> ``` Thinking... We need to answer the riddle: The ball hasn't been opened or removed; she hasn't opened the box, so the ball remains inside the box. She turns it upside down but no effect. So the red ball is still in the box. She didn't open it. So answer: In the box. But maybe trick: She didn't mention opening. So ball still in the cardboard box. So answer: It's still in the box, wherever the box currently is (backyard). She turned it upside down but didn't open it. So ball remains. So answer: In the cardboard box in the backyard. Provide reasoning. ...done thinking. ``` </details> <details> <summary>Answer</summary> ``` The ball is still inside the cardboard box. She never opened the box, so the ball didn’t leave it. After turning it upside‑down she carried the box to the backyard, so the red ball is there, snug inside the cardboard box. ``` </details>
Author
Owner

@drifkin commented on GitHub (Aug 7, 2025):

gpt-oss doesn't natively support not thinking. For deepseek-r1 we put in a template hack to prefill it with an empty thinking trace, which doesn't work great. gpt-oss doesn't work well with this technique. If you want to try out something similar, you can pass in a role: "assistant" message as the final message and pass in some very short (but non-empty) "thinking" text to see how it behaves with hardcoded thoughts

<!-- gh-comment-id:3162153146 --> @drifkin commented on GitHub (Aug 7, 2025): `gpt-oss` doesn't natively support not thinking. For deepseek-r1 we put in a template hack to prefill it with an empty thinking trace, which doesn't work great. `gpt-oss` doesn't work well with this technique. If you want to try out something similar, you can pass in a `role: "assistant"` message as the final message and pass in some very short (but non-empty) `"thinking"` text to see how it behaves with hardcoded thoughts
Author
Owner

@EmirhanSyl commented on GitHub (Aug 7, 2025):

Interestingly, my model doesn't make rasoning while using it via from langchain_openai import ChatOpenAI class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code:

question_agent = ChatOpenAI(
    model="gpt-oss",
    base_url=ollama_url,
    api_key="dummy",
    streaming=True,
    temperature=0.1,
)

It also has 18 different tool bindings about statistics.

<!-- gh-comment-id:3164039555 --> @EmirhanSyl commented on GitHub (Aug 7, 2025): Interestingly, my model doesn't make rasoning while using it via `from langchain_openai import ChatOpenAI` class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code: ```py question_agent = ChatOpenAI( model="gpt-oss", base_url=ollama_url, api_key="dummy", streaming=True, temperature=0.1, ) ``` It also has 18 different tool bindings about statistics.
Author
Owner

@MarcoFerreiraPerson commented on GitHub (Aug 7, 2025):

Interestingly, my model doesn't make rasoning while using it via from langchain_openai import ChatOpenAI class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code:

question_agent = ChatOpenAI(
model="gpt-oss",
base_url=ollama_url,
api_key="dummy",
streaming=True,
temperature=0.1,
)

It also has 18 different tool bindings about statistics.

same issue

<!-- gh-comment-id:3165803560 --> @MarcoFerreiraPerson commented on GitHub (Aug 7, 2025): > Interestingly, my model doesn't make rasoning while using it via `from langchain_openai import ChatOpenAI` class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code: > > question_agent = ChatOpenAI( > model="gpt-oss", > base_url=ollama_url, > api_key="dummy", > streaming=True, > temperature=0.1, > ) > > It also has 18 different tool bindings about statistics. same issue
Author
Owner

@EmirhanSyl commented on GitHub (Aug 7, 2025):

I fixed this issue by simply updating langchain-ollama and langchain-openai models. After updating it, reasoning content comes under "additional_kwargs" while using ChatOllama. But in any cases model was doing reasoning

Interestingly, my model doesn't make rasoning while using it via from langchain_openai import ChatOpenAI class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code:
question_agent = ChatOpenAI(
model="gpt-oss",
base_url=ollama_url,
api_key="dummy",
streaming=True,
temperature=0.1,
)
It also has 18 different tool bindings about statistics.

same issue

<!-- gh-comment-id:3165825949 --> @EmirhanSyl commented on GitHub (Aug 7, 2025): I fixed this issue by simply updating `langchain-ollama` and `langchain-openai` models. After updating it, reasoning content comes under "additional_kwargs" while using ChatOllama. But in any cases model was doing reasoning > > Interestingly, my model doesn't make rasoning while using it via `from langchain_openai import ChatOpenAI` class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code: > > question_agent = ChatOpenAI( > > model="gpt-oss", > > base_url=ollama_url, > > api_key="dummy", > > streaming=True, > > temperature=0.1, > > ) > > It also has 18 different tool bindings about statistics. > > same issue
Author
Owner

@ggcr commented on GitHub (Sep 2, 2025):

Interestingly, my model doesn't make rasoning while using it via from langchain_openai import ChatOpenAI class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code:

question_agent = ChatOpenAI(
model="gpt-oss",
base_url=ollama_url,
api_key="dummy",
streaming=True,
temperature=0.1,
)
It also has 18 different tool bindings about statistics.

Have you tried increasing the temperature? 0.1 might be too low for reasoning models, Unsloth recommends a temperature of 1.0

<!-- gh-comment-id:3245375033 --> @ggcr commented on GitHub (Sep 2, 2025): > Interestingly, my model doesn't make rasoning while using it via `from langchain_openai import ChatOpenAI` class. I want to enable reasoning but model gives direct answer instead of internal reasoning. Here is the definition of the model in my code: > > question_agent = ChatOpenAI( > model="gpt-oss", > base_url=ollama_url, > api_key="dummy", > streaming=True, > temperature=0.1, > ) > It also has 18 different tool bindings about statistics. Have you tried increasing the temperature? 0.1 might be too low for reasoning models, [Unsloth](https://docs.unsloth.ai/basics/gpt-oss-how-to-run-and-fine-tune) recommends a temperature of 1.0
Author
Owner

@clort81 commented on GitHub (Jan 30, 2026):

<|start|>system<|message|>Reasoning: low<|end|>
<|start|>user<|message|>
Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room,
then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes.
When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway.
Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?”
<|end|><|start|>assistant

There is no correct answer since you never specified that she closed the top of the box after placing the ball inside. The box could be open the entire time thus ball could be in hallway.

Yes, if the box is already open, then you can't open it again.

Please think of a logical question next time before 'testing' your model.

<!-- gh-comment-id:3825486092 --> @clort81 commented on GitHub (Jan 30, 2026): > <|start|>system<|message|>Reasoning: low<|end|> > <|start|>user<|message|> > Anna places a red ball inside a cardboard box in the kitchen. She carries the box to the living room, > then to the bedroom. She leaves the box there and goes to the bathroom for a few minutes. > When she comes back, she picks up the box again and, without opening it, turns it upside-down in the hallway. > Then she carries it to the garage and finally to the backyard. She now asks: “Where is the red ball?” > <|end|><|start|>assistant There is no correct answer since you never specified that she closed the top of the box after placing the ball inside. The box could be open the entire time thus ball could be in hallway. Yes, if the box is already open, then you can't open it again. Please think of a logical question next time before 'testing' your model.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69846