ollama - 💡(How to fix) Fix Feature request: PARAMETER think false in Modelfile for Qwen 3.5 / thinking models [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#14809Fetched 2026-04-08 00:43:14
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
3
Timeline (top)
closed ×1commented ×1

Error Message

  • PARAMETER think false — returns Error: unknown parameter 'think'

Fix Action

Fix / Workaround

Current Workaround Attempts

Code Example

{ "model": "qwen3.5:122b-a10b", "think": false, "messages": [...] }

---

FROM qwen3.5:122b-a10b
PARAMETER think false
RAW_BUFFERClick to expand / collapse

Problem

There is no way to disable thinking mode for Qwen 3.5 (and other thinking models) at the Modelfile level.

Currently the only way to disable thinking is to pass think: false in the API request body:

{ "model": "qwen3.5:122b-a10b", "think": false, "messages": [...] }

However, clients that don't support passing custom Ollama parameters (e.g. OpenClaw, many OpenAI-compat clients) have no way to disable thinking — they just get endless thinking token streams, effectively hanging the request.

Expected Behavior

A Modelfile should support:

FROM qwen3.5:122b-a10b
PARAMETER think false

This would allow creating a model variant that disables thinking by default, regardless of what the client sends.

Current Workaround Attempts

  • SYSTEM /no_think in Modelfile — does not work when the client sends its own system prompt (which overrides the Modelfile SYSTEM value)
  • PARAMETER think false — returns Error: unknown parameter 'think'
  • API-level think: false — works but requires client support

Environment

  • Ollama: 0.17.5 and 0.17.7 (both affected)
  • Model: qwen3.5:122b-a10b (Q4_K_M, 125B)
  • Hardware: Apple M1 Ultra, macOS

Impact

Without this, any client that sends a custom system prompt cannot use Qwen 3.5 without the thinking phase hanging the connection — even with a dedicated no-think Modelfile variant.

extent analysis

Fix Plan

To address the issue, we need to add support for the think parameter at the Modelfile level. Here are the steps:

  • Update the Ollama configuration to recognize the think parameter in Modelfiles.
  • Modify the Modelfile parser to handle the PARAMETER think false directive.

Example code changes:

# In ollama/config.py
known_parameters = ['think']  # add 'think' to the list of known parameters

# In ollama/modelfile.py
def parse_modelfile(modelfile_content):
    # ...
    for line in modelfile_content.splitlines():
        if line.startswith('PARAMETER '):
            param, value = line.split(' ', 2)[1:]
            if param == 'think':
                model_config['think'] = value.lower() == 'false'
            # ...
    # ...
  • Update the API to respect the think parameter set in the Modelfile.

Example code changes:

# In ollama/api.py
def handle_request(request):
    # ...
    model_config = get_model_config(request.model)
    think = request.get('think', model_config.get('think', True))
    # ...

Verification

To verify the fix, create a Modelfile with the PARAMETER think false directive and test it with a client that sends a custom system prompt. The thinking phase should be disabled, and the request should not hang.

Example Modelfile:

FROM qwen3.5:122b-a10b
PARAMETER think false

Extra Tips

  • Make sure to update the documentation to reflect the new think parameter support in Modelfiles.
  • Consider adding a default value for the think parameter in the Ollama configuration to ensure backward compatibility.

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