[GH-ISSUE #12086] Parameter "think": False does not disable reasoning for qwen3 30b #54542

Closed
opened 2026-04-29 06:17:15 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @gvsolent on GitHub (Aug 26, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12086

What is the issue?

Dear developers,

The parameter "think": False does not disable reasoning for qwen3 30b.

There is always a reasoning within < think > tags at the beginning of the answer.

We tried disabling it with the API call, and also via de CLI. The same issue remains.

Could you fix that? It's important for many use cases to disable reasoning, and most providers offer this functionality.

More details below.

Best,

the LLM call

import requests
import json

# URL de ton instance Ollama
OLLAMA_URL = "your_url"

# Modèle (ex: deepseek-r1, qwen2.5:7b, etc.)
MODEL = "qwen3:30b"

# Prompt simple
PROMPT = "how many r in the word strawberry?"

# Payload minimal avec paramètre "think"
payload = {
    "model": MODEL,
    "messages": [
        {"role": "user", "content": PROMPT}
    ],
    "think": False, 
    "stream": False
}

print("➡️ Payload envoyé :")
print(json.dumps(payload, indent=2))

# Appel HTTP POST
resp = requests.post(OLLAMA_URL, json=payload)

print("\n➡️ Status:", resp.status_code)
print("\n➡️ Réponse brute :")
print(resp.text)

try:
    data = resp.json()
    print("\n➡️ Contenu extrait :")
    print(json.dumps(data, indent=2))
except Exception as e:
    print("Erreur parsing JSON:", e)

Relevant log output

The response:
{
  "model": "qwen3:30b",
  "created_at": "2025-08-26T12:35:19.871217728Z",
  "message": {
    "role": "assistant",
    "content": "**<think>**\nFirst, the question is: \"how many r in the word strawberry?\"\n\nI need to count the number of times the letter 'r' appears in the word \"strawberry\".\n\nLet me write down the word: s-t-r-a-w-b-e-r-r-y.\n\nNow, I'll go through each letter one by one:\n\n- Position 1: s - not r\n\n- Position 2: t - not r\n\n- Position 3: r - yes, that's one r\n\n- Position 4: a - not r\n\n- Position 5: w - not r\n\n- Position 6: b - not r\n\n- Position 7: e - not r\n\n- Position 8: r - yes, that's the second r\n\n- Position 9: r - yes, that's the third r\n\n- Position 10: y - not r\n\nI think I might have miscounted. Let me spell \"strawberry\" correctly.\n\nThe standard spelling is S-T-R-A-W-B-E-R-R-Y.\n\nLet's list the letters with indices:\n\n1. S\n\n2. T\n\n3. R\n\n4. A\n\n5. W\n\n6. B\n\n7. E\n\n8. R\n\n9. R\n\n10. Y\n\nNow, the 'r's are at positions 3, 8, and 9.\n\nSo, that's three 'r's.\n\nPosition 3: R\n\nPosition 8: R\n\nPosition 9: R\n\nYes, three r's.\n\nBut let me double-check the word. Is \"strawberry\" spelled with two r's at the end?\n\nI know that \"strawberry\" has double r after the e.\n\nConfirming: S-T-R-A-W-B-E-R-R-Y.\n\nAfter \"berry\", it's B-E-R-R-Y, so \"berry\" has two r's.\n\n\"Berry\" is B-E-R-R-Y, so two r's.\n\nIn \"strawberry\", it's \"straw\" + \"berry\", but \"straw\" has one r, and \"berry\" has two r's, but when combined, it's S-T-R-A-W-B-E-R-R-Y.\n\nSo, letters:\n\n- S\n\n- T\n\n- R (from straw)\n\n- A\n\n- W\n\n- B\n\n- E\n\n- R (first from berry)\n\n- R (second from berry)\n\n- Y\n\nSo, R at index 3, 8, and 9.\n\nThus, three r's.\n\nSometimes people might miscount, but I think it's clear.\n\nI can count the occurrences.\n\nWrite the word: strawberry\n\nRemove all non-r characters: but better to iterate.\n\ns: not r\n\nt: not r\n\nr: yes (1)\n\na: not r\n\nw: not r\n\nb: not r\n\ne: not r\n\nr: yes (2)\n\nr: yes (3)\n\ny: not r\n\nSo, three r's.\n\nIn the word, it's \"berry\" with double r, so yes.\n\nI recall that in some contexts, people might think it's only one, but no, it's double r.\n\nFor example, \"berry\" has two r's, and \"straw\" has one r, so total three.\n\n\"Straw\" is S-T-R-A-W, so one r.\n\n\"Berry\" is B-E-R-R-Y, two r's.\n\nCombined, no change, so strawberry has three r's.\n\nTo be thorough, let's look up the spelling or count.\n\nI can type it out: s-t-r-a-w-b-e-r-r-y.\n\nNow, count the r's: after t, r; then after e, r; and another r before y.\n\nSo, r, r, r? No: positions: 3rd letter r, 8th r, 9th r.\n\nIn terms of sequence: the r's are at the third character, and then the eighth and ninth are both r.\n\nIn the string \"strawberry\", the substring \"rr\" appears at the end of \"berry\".\n\nSo, yes.\n\nPerhaps the question is case-sensitive, but it's all lowercase, I assume.\n\nThe word is given as \"strawberry\", so lowercase, and we're counting 'r', so it's fine.\n\nSo, there are three 'r's.\n\nBut let me make sure about the word. Is it possible that it's misspelled or something? No, \"strawberry\" is standard.\n\nI can think of how it's pronounced, but spelling is what matters for counting letters.\n\nPronunciation might have one sound, but for letter count, it's written with three r's.\n\nFor example, in \"strawberry\", the double r is pronounced as a single sound sometimes, but in writing, it's two separate r's.\n\nSo, for letter count, it's two r's in \"berry\", plus one in \"straw\", total three.\n\n\"Straw\" has one r, \"berry\" has two r's, so together, since it's one word, it's three r's.\n\nAnother way: total letters in \"strawberry\": let's count all letters.\n\nS-T-R-A-W-B-E-R-R-Y: that's 10 letters.\n\nPositions: 1S,2T,3R,4A,5W,6B,7E,8R,9R,10Y.\n\nR at 3,8,9: three times.\n\nIf I remove all non-r, I get r,r,r.\n\nSo, three r's.\n\nI think I'm overthinking it. It should be three.\n\nBut I recall that sometimes in puzzles, people get confused with \"strawberry\" because it has a double r, but it's clear.\n\nPerhaps the question is a trick, but I don't think so.\n\nAnother thought: is \"y\" considered, but no, we're counting 'r', not y.\n\nOr maybe case, but it's all lowercase.\n\nThe question says \"the word strawberry\", so it's given in lowercase.\n\nSo, answer should be 3.\n\nBut let me see if there's any common mistake.\n\nFor example, some might think \"strawberry\" has only two r's, missing the one in \"straw\".\n\nBut \"straw\" has an r, so it should be included.\n\n\"Straw\" is S-T-R-A-W, so R is the third letter.\n\nYes.\n\nIn some fonts, it might look different, but in standard English, it's three.\n\nI can count the characters in a string.\n\nLet me write it: s t r a w b e r r y\n\nNow, list:\n\n- s: not r\n\n- t: not r\n\n- r: r (1)\n\n- a: not r\n\n- w: not r\n\n- b: not r\n\n- e: not r\n\n- r: r (2)\n\n- r: r (3)\n\n- y: not r\n\nSo, three r's.\n\nTherefore, the answer should be 3.\n\nThe question says \"how many r\", and in the context, it's clear.\n\nPerhaps it's a typo or something, but I think for standard English, it's three.\n\nI think I should go with 3.\n\nBut let me confirm with a quick search in my mind: I know that \"strawberry\" has 10 letters, with three r's.\n\nYes.\n\nSo, for the response, I should say 3.\n\nThe user might be testing for common errors.\n\nFor example, some people might say two, forgetting the r in \"straw\", but that's incorrect.\n\nOr they might count the double r as one, but no, it's two separate letters.\n\nIn \"berry\", it's two r's, so in the word, it's two.\n\nPlus the one before.\n\nSo, three.\n\nPerhaps in the word, position 8 and 9 are both r, so two, and position 3 is one, total three.\n\nI think I'm solid.\n\nSo, the answer is 3.\n</think>\n\nThe word \"strawberry\" contains **3** instances of the letter \"r\".  \n\nHere's a breakdown for clarity:  \n- The word is spelled: **s-t-r-a-w-b-e-r-r-y**.  \n- The \"r\" appears at:  \n  - Position 3 (after \"st\"),  \n  - Position 8 (after \"e\"),  \n  - Position 9 (after the previous \"r\").  \n\nSo, the letters are:  \ns, t, **r**, a, w, b, e, **r**, **r**, y.  \n\nThis confirms there are **three \"r\"s** in total.  \n\nNote: This is based on the standard English spelling of \"strawberry\" (10 letters total). Common mistakes might lead to counting only 2 \"r\"s (e.g., forgetting the \"r\" in \"straw\" or miscounting the double \"r\" in \"berry\"), but the correct count is **3**."
  },
  "done_reason": "stop",
  "done": true,
  "total_duration": 16213196224,
  "load_duration": 5296233329,
  "prompt_eval_count": 16,
  "prompt_eval_duration": 109965366,
  "eval_count": 1886,
  "eval_duration": 10806451397
}

OS

NA

GPU

NA

CPU

NA

Ollama version

0.11.7

Originally created by @gvsolent on GitHub (Aug 26, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12086 ### What is the issue? Dear developers, The parameter "think": False does not disable reasoning for qwen3 30b. There is always a reasoning within < think > tags at the beginning of the answer. We tried disabling it with the API call, and also via de CLI. The same issue remains. Could you fix that? It's important for many use cases to disable reasoning, and most providers offer this functionality. More details below. Best, ### the LLM call ```shell import requests import json # URL de ton instance Ollama OLLAMA_URL = "your_url" # Modèle (ex: deepseek-r1, qwen2.5:7b, etc.) MODEL = "qwen3:30b" # Prompt simple PROMPT = "how many r in the word strawberry?" # Payload minimal avec paramètre "think" payload = { "model": MODEL, "messages": [ {"role": "user", "content": PROMPT} ], "think": False, "stream": False } print("➡️ Payload envoyé :") print(json.dumps(payload, indent=2)) # Appel HTTP POST resp = requests.post(OLLAMA_URL, json=payload) print("\n➡️ Status:", resp.status_code) print("\n➡️ Réponse brute :") print(resp.text) try: data = resp.json() print("\n➡️ Contenu extrait :") print(json.dumps(data, indent=2)) except Exception as e: print("Erreur parsing JSON:", e) ``` ### Relevant log output ```shell The response: { "model": "qwen3:30b", "created_at": "2025-08-26T12:35:19.871217728Z", "message": { "role": "assistant", "content": "**<think>**\nFirst, the question is: \"how many r in the word strawberry?\"\n\nI need to count the number of times the letter 'r' appears in the word \"strawberry\".\n\nLet me write down the word: s-t-r-a-w-b-e-r-r-y.\n\nNow, I'll go through each letter one by one:\n\n- Position 1: s - not r\n\n- Position 2: t - not r\n\n- Position 3: r - yes, that's one r\n\n- Position 4: a - not r\n\n- Position 5: w - not r\n\n- Position 6: b - not r\n\n- Position 7: e - not r\n\n- Position 8: r - yes, that's the second r\n\n- Position 9: r - yes, that's the third r\n\n- Position 10: y - not r\n\nI think I might have miscounted. Let me spell \"strawberry\" correctly.\n\nThe standard spelling is S-T-R-A-W-B-E-R-R-Y.\n\nLet's list the letters with indices:\n\n1. S\n\n2. T\n\n3. R\n\n4. A\n\n5. W\n\n6. B\n\n7. E\n\n8. R\n\n9. R\n\n10. Y\n\nNow, the 'r's are at positions 3, 8, and 9.\n\nSo, that's three 'r's.\n\nPosition 3: R\n\nPosition 8: R\n\nPosition 9: R\n\nYes, three r's.\n\nBut let me double-check the word. Is \"strawberry\" spelled with two r's at the end?\n\nI know that \"strawberry\" has double r after the e.\n\nConfirming: S-T-R-A-W-B-E-R-R-Y.\n\nAfter \"berry\", it's B-E-R-R-Y, so \"berry\" has two r's.\n\n\"Berry\" is B-E-R-R-Y, so two r's.\n\nIn \"strawberry\", it's \"straw\" + \"berry\", but \"straw\" has one r, and \"berry\" has two r's, but when combined, it's S-T-R-A-W-B-E-R-R-Y.\n\nSo, letters:\n\n- S\n\n- T\n\n- R (from straw)\n\n- A\n\n- W\n\n- B\n\n- E\n\n- R (first from berry)\n\n- R (second from berry)\n\n- Y\n\nSo, R at index 3, 8, and 9.\n\nThus, three r's.\n\nSometimes people might miscount, but I think it's clear.\n\nI can count the occurrences.\n\nWrite the word: strawberry\n\nRemove all non-r characters: but better to iterate.\n\ns: not r\n\nt: not r\n\nr: yes (1)\n\na: not r\n\nw: not r\n\nb: not r\n\ne: not r\n\nr: yes (2)\n\nr: yes (3)\n\ny: not r\n\nSo, three r's.\n\nIn the word, it's \"berry\" with double r, so yes.\n\nI recall that in some contexts, people might think it's only one, but no, it's double r.\n\nFor example, \"berry\" has two r's, and \"straw\" has one r, so total three.\n\n\"Straw\" is S-T-R-A-W, so one r.\n\n\"Berry\" is B-E-R-R-Y, two r's.\n\nCombined, no change, so strawberry has three r's.\n\nTo be thorough, let's look up the spelling or count.\n\nI can type it out: s-t-r-a-w-b-e-r-r-y.\n\nNow, count the r's: after t, r; then after e, r; and another r before y.\n\nSo, r, r, r? No: positions: 3rd letter r, 8th r, 9th r.\n\nIn terms of sequence: the r's are at the third character, and then the eighth and ninth are both r.\n\nIn the string \"strawberry\", the substring \"rr\" appears at the end of \"berry\".\n\nSo, yes.\n\nPerhaps the question is case-sensitive, but it's all lowercase, I assume.\n\nThe word is given as \"strawberry\", so lowercase, and we're counting 'r', so it's fine.\n\nSo, there are three 'r's.\n\nBut let me make sure about the word. Is it possible that it's misspelled or something? No, \"strawberry\" is standard.\n\nI can think of how it's pronounced, but spelling is what matters for counting letters.\n\nPronunciation might have one sound, but for letter count, it's written with three r's.\n\nFor example, in \"strawberry\", the double r is pronounced as a single sound sometimes, but in writing, it's two separate r's.\n\nSo, for letter count, it's two r's in \"berry\", plus one in \"straw\", total three.\n\n\"Straw\" has one r, \"berry\" has two r's, so together, since it's one word, it's three r's.\n\nAnother way: total letters in \"strawberry\": let's count all letters.\n\nS-T-R-A-W-B-E-R-R-Y: that's 10 letters.\n\nPositions: 1S,2T,3R,4A,5W,6B,7E,8R,9R,10Y.\n\nR at 3,8,9: three times.\n\nIf I remove all non-r, I get r,r,r.\n\nSo, three r's.\n\nI think I'm overthinking it. It should be three.\n\nBut I recall that sometimes in puzzles, people get confused with \"strawberry\" because it has a double r, but it's clear.\n\nPerhaps the question is a trick, but I don't think so.\n\nAnother thought: is \"y\" considered, but no, we're counting 'r', not y.\n\nOr maybe case, but it's all lowercase.\n\nThe question says \"the word strawberry\", so it's given in lowercase.\n\nSo, answer should be 3.\n\nBut let me see if there's any common mistake.\n\nFor example, some might think \"strawberry\" has only two r's, missing the one in \"straw\".\n\nBut \"straw\" has an r, so it should be included.\n\n\"Straw\" is S-T-R-A-W, so R is the third letter.\n\nYes.\n\nIn some fonts, it might look different, but in standard English, it's three.\n\nI can count the characters in a string.\n\nLet me write it: s t r a w b e r r y\n\nNow, list:\n\n- s: not r\n\n- t: not r\n\n- r: r (1)\n\n- a: not r\n\n- w: not r\n\n- b: not r\n\n- e: not r\n\n- r: r (2)\n\n- r: r (3)\n\n- y: not r\n\nSo, three r's.\n\nTherefore, the answer should be 3.\n\nThe question says \"how many r\", and in the context, it's clear.\n\nPerhaps it's a typo or something, but I think for standard English, it's three.\n\nI think I should go with 3.\n\nBut let me confirm with a quick search in my mind: I know that \"strawberry\" has 10 letters, with three r's.\n\nYes.\n\nSo, for the response, I should say 3.\n\nThe user might be testing for common errors.\n\nFor example, some people might say two, forgetting the r in \"straw\", but that's incorrect.\n\nOr they might count the double r as one, but no, it's two separate letters.\n\nIn \"berry\", it's two r's, so in the word, it's two.\n\nPlus the one before.\n\nSo, three.\n\nPerhaps in the word, position 8 and 9 are both r, so two, and position 3 is one, total three.\n\nI think I'm solid.\n\nSo, the answer is 3.\n</think>\n\nThe word \"strawberry\" contains **3** instances of the letter \"r\". \n\nHere's a breakdown for clarity: \n- The word is spelled: **s-t-r-a-w-b-e-r-r-y**. \n- The \"r\" appears at: \n - Position 3 (after \"st\"), \n - Position 8 (after \"e\"), \n - Position 9 (after the previous \"r\"). \n\nSo, the letters are: \ns, t, **r**, a, w, b, e, **r**, **r**, y. \n\nThis confirms there are **three \"r\"s** in total. \n\nNote: This is based on the standard English spelling of \"strawberry\" (10 letters total). Common mistakes might lead to counting only 2 \"r\"s (e.g., forgetting the \"r\" in \"straw\" or miscounting the double \"r\" in \"berry\"), but the correct count is **3**." }, "done_reason": "stop", "done": true, "total_duration": 16213196224, "load_duration": 5296233329, "prompt_eval_count": 16, "prompt_eval_duration": 109965366, "eval_count": 1886, "eval_duration": 10806451397 } ``` ### OS NA ### GPU NA ### CPU NA ### Ollama version 0.11.7
GiteaMirror added the bug label 2026-04-29 06:17:15 -05:00
Author
Owner

@gvsolent commented on GitHub (Aug 26, 2025):

PS : the disable reasoning however works with deepseek-r1:70b

<!-- gh-comment-id:3224242598 --> @gvsolent commented on GitHub (Aug 26, 2025): PS : the disable reasoning however works with deepseek-r1:70b
Author
Owner

@rick-github commented on GitHub (Aug 26, 2025):

qwen3:30b comes in two variants - thinking and non-thinking. It is not a hybrid model. If you want to disable thinking, use the non-thinking version: qwen3:30b-a3b-instruct-2507-q4_K_M.

<!-- gh-comment-id:3224447470 --> @rick-github commented on GitHub (Aug 26, 2025): qwen3:30b comes in two variants - thinking and non-thinking. It is not a hybrid model. If you want to disable thinking, use the non-thinking version: [qwen3:30b-a3b-instruct-2507-q4_K_M](https://ollama.com/library/qwen3:30b-a3b-instruct-2507-q4_K_M).
Author
Owner

@lapo-luchini commented on GitHub (Aug 26, 2025):

qwen3:30b comes in two variants - thinking and non-thinking. It is not a hybrid model.

Actually it states to be one, although using the /no_think string in the query.

<!-- gh-comment-id:3224663334 --> @lapo-luchini commented on GitHub (Aug 26, 2025): > qwen3:30b comes in two variants - thinking and non-thinking. It is not a hybrid model. Actually it [states to be one](https://huggingface.co/Qwen/Qwen3-32B#:~:text=add%20%2Fthink%20and-,%2Fno_think,-to%20user%20prompts), although using the `/no_think` string in the query.
Author
Owner

@rick-github commented on GitHub (Aug 26, 2025):

That's qwen3:32b, not qwen3:30b.

<!-- gh-comment-id:3224683184 --> @rick-github commented on GitHub (Aug 26, 2025): That's qwen3:32b, not qwen3:30b.
Author
Owner

@gvsolent commented on GitHub (Aug 26, 2025):

Actually, the former version of qwen3:30b was a hybrid model in which you could switch between thinking and non thinking. that's why it's confusing.

@rick-github is correct that it's not the case anymore.

It solved my problem, thanks!

maybe good to be a bit more specific about whether one version is reasoning or not on ollama's webpage.

there still is a flag "thinking" there: qwen3:30b-a3b-instruct-2507-q4_K_M.

<!-- gh-comment-id:3224718590 --> @gvsolent commented on GitHub (Aug 26, 2025): Actually, the former version of qwen3:30b was a hybrid model in which you could switch between thinking and non thinking. that's why it's confusing. @rick-github is correct that it's not the case anymore. It solved my problem, thanks! maybe good to be a bit more specific about whether one version is reasoning or not on ollama's webpage. there still is a flag "thinking" there: [qwen3:30b-a3b-instruct-2507-q4_K_M](https://ollama.com/library/qwen3:30b-a3b-instruct-2507-q4_K_M).
Author
Owner

@rick-github commented on GitHub (Aug 26, 2025):

The old hybrid model is still available as qwen3:30b-a3b-q4_K_M if that's you want to use. Qwen seem to be moving away from hybrid models with their newer releases.

<!-- gh-comment-id:3224740138 --> @rick-github commented on GitHub (Aug 26, 2025): The old hybrid model is still available as [qwen3:30b-a3b-q4_K_M](https://ollama.com/library/qwen3:30b-a3b-q4_K_M) if that's you want to use. Qwen seem to be moving away from hybrid models with their newer releases.
Author
Owner

@lapo-luchini commented on GitHub (Aug 26, 2025):

Actually, the former version of qwen3:30b was a hybrid model in which you could switch between thinking and non thinking. that's why it's confusing.

Ohhh! Thanks! I did just update weight using ollama pull qwen3:30b-a3b without changing model and I would have never thought it would have changed behavior.

<!-- gh-comment-id:3225496385 --> @lapo-luchini commented on GitHub (Aug 26, 2025): > Actually, the former version of qwen3:30b was a hybrid model in which you could switch between thinking and non thinking. that's why it's confusing. Ohhh! Thanks! I did just update weight using `ollama pull qwen3:30b-a3b` without changing model and I would have never thought it would have changed behavior.
Author
Owner

@pdevine commented on GitHub (Aug 27, 2025):

The naming is super confusing. I'm going to go ahead and close the issue as answered.

<!-- gh-comment-id:3226169902 --> @pdevine commented on GitHub (Aug 27, 2025): The naming is super confusing. I'm going to go ahead and close the issue as answered.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#54542