Qwen 3.8 27B reasoning_effort: Why It Overthinks and How to Cut the Token Bill
On Friday, Alibaba's Qwen team released Qwen 3.8 27B — an Apache-2.0, 27-billion-parameter, vision-capable model that a 17GB Q4_K_M file can run on a laptop. It is genuinely great: strong code, tool calling, long context, solid image understanding. But it ships with a jaw-dropping default: the model sets reasoning_effort to xhigh, its most thorough level. In independent testing from Simon Willison (August 16, 2026), that default makes the model over-think nearly everything — burning 7x as many tokens on reasoning as on the actual answer and costing developers real money on hosted APIs. This article is the practical tuning guide: what reasoning_effort does, the verified numbers behind the overthinking problem, the exact code to cap or disable it, and how to pick the right level per workload.
xhigh reasoning is a cost landmine on paid APIs — in one measured case it spent 22,276 thinking tokens to produce 3,223, a 7x waste. Setting reasoning_effort: "low" (or "medium") on most workloads, or disabling thinking entirely for trivial calls, typically cuts thinking-token spend by 60–90% while keeping quality on everything that matters. Keep xhigh only for genuinely hard, one-shot reasoning tasks.The problem: a default that encourages overthinking
Qwen's official model card and the chat template shipped with the weights document the parameter: resolved_reasoning_effort = reasoning_effort|default('xhigh'), validated to one of xhigh, medium, or low. The three levels are documented as:
- xhigh (default) — for complex tasks demanding thorough analysis; the prompt instructs the model to "think carefully, validate key assumptions, consider plausible alternatives."
- medium — balancing accuracy and speed.
- low — efficient reasoning optimizing for speed and cost; "keep your thinking brief and focused, move directly to the conclusion."
Thinking mode is also on by default and can be disabled per request (the template guards on enable_thinking), and reasoning context from past turns is preserved via preserve_thinking. What this means in practice: on a fresh API call with no tuning, you almost always pay for a lot of unseen reasoning tokens before you ever see an answer.
Simon Willison's verified test hammered this home. Running the 17GB quantized build locally with the model's default settings, he asked for a pelican-on-a-bicycle SVG. The model burned 22,276 reasoning tokens to emit 3,223 output tokens — about a 7x thinking-to-answer ratio — and took 21 minutes. Running the exact same prompt with reasoning turned off produced 3,715 tokens in ~137 seconds (just over two minutes). Even a trivial "draw an SVG of a circle" at xhigh launched into a several-minute planning monologue about Bauhaus palettes before producing a result that did not match what was asked.
It is not that reasoning is useless — it is not. In the same post, with reasoning on, the model one-shot-built a working image-bounding-box tool; with reasoning off, that exact build placed the boxes in the wrong spots. The overthinking default is a cost and latency problem, not a quality problem. On a paid API every one of those reasoning tokens is billed at the output rate, so an un-tuned xhigh default can turn a sub-cent answer into a multi-cent one and add minutes of latency.
Verified pricing: what those thinking tokens cost
Reasoning tokens are charged at the output/completion rate on every major route. Here is verified per-model pricing for Qwen 3.8 as of August 23, 2026:
| Route | Model | Input / M | Output / M | Cached input / M |
|---|---|---|---|---|
| OpenRouter | qwen/qwen3.8-27b | $0.40 | $3.00 | $0.05 |
| OpenRouter | qwen/qwen3.8-2.4t-a95b | $2.00 | $6.00 | $0.25 |
| Workers AI | @cf/qwen/qwen3.8-27b | $0.45 | $3.20 | n/a (no cached line yet) |
Apply Willison's measured 7x ratio to OpenRouter's $3.00 / M output rate and the picture gets ugly fast. A single request that thinks 22,276 tokens and answers 3,223 tokens bills 25,499 output tokens — about $0.077. Turn reasoning off and the same task is 3,715 output tokens — $0.011. That is roughly a 7x cost reduction on output for tasks that do not need deep reasoning. Reverse the conclusion for genuinely hard prompts: when you do want the model to think, you are spending ≈7x the output budget for that deliberation, and that purchase should be intentional — not a silent default.
Note the OpenRouter route also prices cached input at $0.05 / M, which matters for agent loops that repeat a long system prompt before the thinking stage: always prompt-cache your stable context so the per-turn reasoning budget is the only thing billed at full output rate. (Workers AI has no published cached-input line for this model yet — see our Workers AI Qwen 3.8 27B guide for full pricing and the Neuron conversion.)
How to tune reasoning_effort in code
On OpenAI-compatible and Qwen-native endpoints, reasoning_effort is a top-level request parameter. The cleanest deployment is a per-route policy map so trivial calls default to low (or no thinking) while hard agentic calls keep medium or xhigh.
1. Python (OpenAI SDK or any OpenAI-compatible endpoint — e.g. OpenRouter):
from openai import OpenAI
client = OpenAI(
api_key="YOUR_OPENROUTER_KEY",
base_url="https://openrouter.ai/api/v1",
)
# Trivial extraction: no deep reasoning needed - low effort
low = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content": "Extract the model names from this text."}],
reasoning_effort="low",
max_tokens=300,
)
# Hard one-shot coding task: medium reasoning
hard = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content":
"Write a Python function that renders labelled bounding boxes over an image from a 0-1000 scaled JSON input."}],
reasoning_effort="medium",
)
print(hard.choices[0].message.content)
2. Disable thinking entirely for latency-sensitive traffic. For transcript parsing, JSON normalization, or bulk transforms, skip reasoning altogether — on Qwen-native sampling this is done with enable_thinking: false:
resp = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content": "Convert this session log to clean markdown."}],
enable_thinking=False, # Qwen-native / supported hosts
max_tokens=1200,
)
3. curl, for scripting and quick tests:
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3.8-27b",
"messages": [{"role": "user", "content": "Summarize this README in 5 bullets."}],
"reasoning_effort": "low"
}'
4. Streaming with usage telemetry. Reasoning tokens arrive in the reasoning_content field; request stream_options={"include_usage": true} so you can measure the thinking-to-answer ratio per request and dial reasoning_effort accordingly:
stream = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[{"role": "user", "content": "Explain quantum computing simply."}],
reasoning_effort="medium",
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
# chunk.choices[0].delta.reasoning_content -> thinking tokens
# chunk.usage -> completion_tokens / prompt_tokens totals
pass
If your provider passes through the OpenAI-compatible schema, keep an eye on whether your SDK surfaces reasoning_content — some gateways fold it into content. Either way, the usage object is the source of truth for what you are billed.
Which level for which workload
The right setting is a function of task difficulty, not model loyalty. A workable default policy:
| Workload | reasoning_effort | Why |
|---|---|---|
| Extraction, normalization, summarization, translation | low or off | Deterministic output, latency matters, no multi-step insight needed |
| Code generation, tool building, one-shot agents | medium | Best cost/quality balance; Willison's tool build worked at reasoning-on |
| Long agent loops with a stable system prompt | medium | Prompt-cache the static context; spend only on the per-turn reasoning |
| Math, logic, multi-step planning, debugging | xhigh | Reserve the expensive default for work that measurably needs it |
For agentic and local-runner scenarios you should also look at the complement to capping thinking tokens: native Multi-Token Prediction (MTP). On llama.cpp, running Qwen 3.8 with --spec-type draft-mtp measured roughly 72% faster local generation in the same benchmark, because a cheaper draft head guesses several tokens ahead for the main model to verify. Capping reasoning_effort cuts the number of tokens you generate; MTP cuts the time per token. Use both together for the cheapest fast path.
Limitations and gotchas
- Default bleed-through. If you fork or self-host the official weights and do not set
reasoning_effort, the chat template forcesxhigh. Always pass it explicitly per request or in your sampler defaults. - Provider acceptance varies. Not every OpenAI-compatible host maps
reasoning_effortorenable_thinkingthe same way. On some gateways the parameter silently no-ops and you keep paying the default — verify with a streaming usage readout before trusting a "low" tag. - Thinking tokens bill at output rate. Reasoning is not a free "hidden" stage; every thinking token is a completion token on the invoice. Cache your system prompt (OpenRouter cached input is $0.05/M vs $0.40/M) so repeated-traffic reasoning is the only full-price line.
- Quality is genuinely better with reasoning on hard tasks. Turning it off everywhere to save money will degrade one-shot code and tool building. The measured 7x waste is a default problem, not a reason to disable reasoning globally.
- Context pressure. At the local default context size (8,192), overthinking can consume the entire window before the model finishes thinking, forcing truncation. Raise the context window (
max_tokens/ context length) when you intentionally run atxhigh.
FAQ
How do I check what reasoning_effort my request actually used? Stream with stream_options={"include_usage": true} and sum reasoning_content/usage. The ratio of reasoning tokens : answer tokens tells you immediately if a workload is overthinking.
Is Qwen 3.8 27B the same as the Qwen3.8-Max flagship? No. The 27B is a 27-billion-parameter, vision-capable, edge-tier open model (a 17GB quant on disk). The Max/2.4T-A95B and Qwen3.8-Max flagships are hundreds of billions of parameters, cost far more per token, and are served on Bailian and partner clouds. For a full comparison of the Qwen model tiers and Bailian endpoints, see our Bailian API guide.
Does reasoning_effort apply when I call through OpenRouter? Yes. OpenRouter lists qwen/qwen3.8-27b with reasoning support and passes the top-level reasoning_effort parameter through. The model list also shows it with a 1M context window on that route, which gives the thinking stage plenty of headroom.
Can I just leave thinking on but make it cheaper? Yes — set "medium" as your global default and "low" (or off) for trivial calls, and reserve "xhigh" for genuinely hard one-shot prompts. Combined with prompt caching and MTP-style acceleration on local runners, you keep the model's real reasoning strengths without paying the 7x default tax.
Bottom line
Qwen 3.8 27B's default xhigh reasoning is the single biggest hidden cost of running this model. The official chat template forces it, the measured overthinking ratio is about 7x thinking tokens to answer tokens (22,276 : 3,223 in the verified reference case), and because thinking bills at the output rate, that quietly multiplies your per-request cost and latency on paid APIs. The fix is small and mechanical: pass reasoning_effort: "low"/"medium" (or enable_thinking: false) per route, cache your stable prompts, and reserve xhigh for work that only makes sense with a long deliberation. Done right, you keep the model's excellent code, tool, and vision ability while cutting thinking-token spend by 60–90% on most traffic. The official Qwen3.8-27B model card carries the authoritative sampling-parameter reference, and our Workers AI pricing guide covers the cloud route in full.
If you are wiring Qwen (or DeepSeek, OpenAI, Anthropic) into an app and want per-model reasoning controls behind a single OpenAI-compatible key instead of juggling five provider dashboards, FreeModel is the simplest handoff: one dashboard, one billing relationship, and cross-region failover without glue code.