You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document reasoning_effort support in OpenAI-compatible /v1/chat/completions API #14820
The OpenAI-compatible /v1/chat/completions endpoint supports reasoning_effort and reasoning request fields for controlling thinking on thinking-capable models (e.g. qwen3.5), but this is not documented in the OpenAI compatibility docs.
Ollama auto-enables thinking for capable models when no reasoning_effort is provided. The only way to discover how to disable thinking via the OpenAI-compat API is to read the source code (openai/openai.go), where reasoning_effort is mapped to the internal Think field:
"high", "medium", "low" → thinking ON (with varying effort)
"none" → thinking OFF
This is especially important because many users connect to Ollama through OpenAI-compatible SDKs and frameworks (PydanticAI, LangChain, etc.) via /v1/chat/completions, and the native Ollama parameter think: true/false does not work on this endpoint. Without documentation, there is no discoverable way to control thinking through the OpenAI-compat API.
Suggested fix
Add reasoning_effort and reasoning to the "Supported request fields" list for /v1/chat/completions in docs/api/openai-compatibility.mdx, with accepted values ("high", "medium", "low", "none").
Example
# Thinking disabled
curl -X POST http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model": "qwen3.5:9b", "messages": [{"role": "user", "content": "What is 2+2?"}], "reasoning_effort": "none" }'# ~2-5 output tokens, no reasoning overhead# Thinking enabled (default when omitted, or explicit)
curl -X POST http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{ "model": "qwen3.5:9b", "messages": [{"role": "user", "content": "What is 2+2?"}], "reasoning_effort": "high" }'# ~200-400 output tokens, includes internal reasoning
For thinking models such as Qwen 3.5, could you clarify what this means?
"high", "medium", "low" → thinking ON, with varying effort
I thought Qwen-style thinking was essentially binary: either thinking is enabled or disabled. Does Ollama actually pass different reasoning-effort levels to Qwen, or do low, medium, and high all just enable thinking?
So the key question is: can Qwen produce controlled amounts of reasoning based on the effort level, or is it only an on/off switch? Thank you!!
Activity
docs: document reasoning_effort support in OpenAI-compatible API
docs: document reasoning_effort support in OpenAI-compatible API
release: imperal-sdk v1.5.19 — Ollama/openai_compatible BYOLLM harden…
NicoCampa commentedon Apr 30, 2026
For thinking models such as Qwen 3.5, could you clarify what this means?
"high", "medium", "low" → thinking ON, with varying effort
I thought Qwen-style thinking was essentially binary: either thinking is enabled or disabled. Does Ollama actually pass different reasoning-effort levels to Qwen, or do low, medium, and high all just enable thinking?
So the key question is: can Qwen produce controlled amounts of reasoning based on the effort level, or is it only an on/off switch? Thank you!!
fix(agent): propagate reasoning_effort to Ollama + curator fork (Nous…
docs: document reasoning_effort support in OpenAI-compatible API (oll…
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
fix(ollama): forward reasoning effort instead of discarding it
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
fix(ollama): emit top-level reasoning_effort=none on /v1/chat/complet…
Use reasoning_effort:none, not think:false, to turn off thinking on O…
docs: document reasoning_effort support in OpenAI-compatible API (oll…