Most advice about reasoning models treats “thinking harder” as a prompt instruction: ask the model to be careful, tell it to verify, add “step by step.” DeepSeek’s V4.1 Flash takes a different approach. It exposes reasoning effort as a number — an integer from 1 to 100, defaulting to 75 — and applies it at encode time, before the model sees the conversation. Thinking time becomes an operational parameter rather than a linguistic suggestion.
That is a small API detail with large consequences. It means you can budget reasoning per request the way you budget memory per process. It also means you can waste money quietly: a default budget applied to a task that needed a third of it produces correct answers at three times the cost. This guide covers what the parameter does, how to choose a value per task class, and how to measure whether the choice paid off.
What the parameter actually controls
Reasoning effort governs how much internal reasoning the model is allowed to perform before producing its final answer. In the V4.1 Flash serving path, the value is set when messages are encoded, not appended to the prompt. The official encoding helper exposes named levels — roughly 50 for low, 75 for high, and 100 for max — alongside the raw integer.
Two practical consequences follow.
First, the setting is not visible to the model as text, so prompt-injection style tricks cannot easily override it. Your infrastructure decides the budget; the conversation does not.
Second, the setting must survive your serving stack. The model does not ship a standard Jinja chat template. If you drop the default Transformers template into place, tool calling, thinking mode, and image input can all fail at once. The supported path is the repository’s encoding script, or the production recipe library. Teams that skip this step usually conclude “the model is worse than the benchmarks” when the real problem is that the reasoning budget never reached the model.
The three failure modes
Reasoning budget tuning is mostly about recognizing three failure shapes.
Under-budgeting looks like confidence without verification. The model answers directly, skips the check step, and produces a plausible but unverified result. On simple extraction or formatting tasks this is correct behavior. On multi-file code changes it produces patches that compile but fail tests. The tell is a short trace and a fast, fluent answer.
Over-budgeting looks like productive churn. The model explores alternatives, rejects them, explores more, and eventually lands on an answer that a lower budget would also have found. Token counts rise, latency rises, and accuracy plateaus. The tell is a long trace whose final answer arrives after the useful reasoning was already done.
Budget mismatch looks like inconsistent quality. The same task class succeeds at 75 and fails at 50 on some inputs but not others. This usually means the task contains a hidden subproblem — a schema ambiguity, a missing test, an underspecified requirement — that only appears sometimes. The fix is not a higher global budget; it is detecting the subproblem and routing it explicitly.
A practical budget map
Treat the budget as a routing decision tied to task class, not a global default.
| Task class | Suggested effort | Why |
|---|---|---|
| Extraction, classification, formatting | 25–45 | The answer is determined by the input; more thinking adds little |
| Routine code edits with tests | 55–70 | Enough room to locate the failure and verify the patch |
| Multi-file refactors, unfamiliar repositories | 75–90 | Requires exploration, hypothesis testing, and self-correction |
| Hard debugging, algorithm design, math | 90–100 | The search space is the problem; cutting it short guarantees failure |
| Agent orchestration steps | 50–65 | Most steps are tool routing; reserve high budgets for planning turns |
Two rules of thumb make this usable. Raise the budget when the task has a verifiable oracle — tests, compilers, schemas — because extra thinking converts directly into fewer failed attempts. Lower the budget when the output is judged by a human quickly, because the marginal reasoning rarely changes the acceptability of a summary or a classification.
Measure cost per accepted answer, not per token
The most common evaluation mistake is comparing price per million tokens. It rewards models that are cheap per token and ignores how many attempts a task takes. DeepSeek’s own release framing is more useful: benchmark position versus cost per task, with the 1017 build reported around 1.5 CNY per completed DeepSWE task.
Adopt the same metric internally:
- Define an accepted outcome. A merged patch, a passing test, a human-approved draft.
- Count total tokens across all attempts, including retries and failed tool calls.
- Divide by accepted outcomes.
- Compare budget settings on that number, holding the harness constant.
This metric exposes a counterintuitive result: a higher reasoning budget can lower cost per accepted answer. If effort 75 succeeds on the first attempt and effort 50 succeeds on the third, the “cheaper” setting is more expensive once retries are counted. The optimum is usually task-class specific and sits below the maximum, not at it.
Where DeepThink fits
The label “DeepThink” is used loosely to describe visible reasoning behavior in DeepSeek’s reasoning models. What the budget parameter adds is control over that behavior. Instead of a binary choice between “thinking mode on” and “thinking mode off,” you get a dial that maps directly to latency and cost.
That makes three operational patterns possible:
- Tiered serving. Route simple requests to a low budget and complex ones to a high budget within the same model, avoiding a separate cheap model for easy traffic.
- Escalation. Start low, detect failure signals such as a missing verification step or a failing test, then retry at a higher budget. Pay for depth only when it is needed.
- Budget-aware agents. Give each step in an agent loop its own allowance. Planning gets depth; tool-call formatting does not. This is cheaper and more predictable than a single high setting for the whole trajectory.
A minimal implementation sketch
The shape of the code matters less than where the value comes from. A typical setup:
from encoding import encode_messages
prompt, media = encode_messages(
messages,
thinking_mode="thinking",
reasoning_effort=budget_for(task_class), # 1-100, default 75
return_multi_modal_data=True,
)
Keep budget_for in configuration, not in prompts. Log the chosen budget with the request ID, the token count, and the outcome. Without that log, you cannot attribute cost changes to budget changes, and tuning becomes guesswork.
What to tune first
If you are adopting the model rather than rebuilding around it, tune in this order:
- Verify the encoding path. Confirm tool calls and thinking mode work before adjusting anything else.
- Set a per-class default. Start at 75 for complex work, 50 for routine work, and measure.
- Add escalation triggers. Retry at a higher budget only on observable failure, not on model self-doubt.
- Cap the high end. Reserve 90–100 for tasks with a verifiable oracle; otherwise it is paid exploration with no acceptance criterion.
- Review weekly. Budgets drift upward because raising them feels safer. The cost-per-accepted-answer metric is the counterweight.
Bottom line
Reasoning effort turns thinking time into an operational dial. The default of 75 is a reasonable starting point, not a universal answer. The teams that benefit most are not the ones that maximize the dial; they are the ones that can explain, per task class, why the setting is what it is — and prove it with cost per accepted outcome rather than cost per token.