Why Multi-Step Reasoning Tasks Keep Hitting the Thinking Budget Cap
As large language models move from single-turn Q&A toward multi-step workflows, new problems have surfaced: reasoning chains that constantly max out the thinking budget, unstable token consumption in non-reasoning mode, and evaluation scores distorted by output caps. This article maps where the latest open-source models excel — long-context understanding, file understanding, content generation, data analysis, long-horizon tasks, and coding/agent capability — and explains the trade-offs between reasoning and non-reasoning mode. It includes reusable cost-estimation and grading functions, a four-stage breakdown of token consumption, and a selection checklist to help turn stronger reasoning into more cost-effective, more reliable results.
Introduction: Long-Horizon Capability Is Becoming the Dividing Line
In the past, evaluating an LLM meant focusing on single-turn accuracy and fluency. Today, more and more real business needs require a model to complete an entire chain end to end: understand material → break down the goal → call tools → check results → iterate and correct. Typical scenarios include analyzing hundreds of pages of documents, maintaining a project with dozens of files, and diagnosing intermittent production incidents. The yardstick is shifting from “did it get the single step right?” to “is it still reliable after many steps?”
The latest generation of open-source models has improved noticeably on this curve, but better capability brings new problems:
- In reasoning mode, the chain of thought grows much longer and frequently hits the preset thinking budget cap.
- In non-reasoning mode, behavior is unstable, and token consumption for simple versus complex requests can differ by tens of times.
- Higher output pricing amplifies billing swings in long-output scenarios.
This article doesn’t focus on any single product. Instead, it centers on a set of general capabilities — long context, file understanding, content generation, data analysis, long-horizon tasks, and coding/agent capability — and discusses how to evaluate, select, and optimize them. At the end, you’ll find reusable cost-estimation and scoring functions.
1. Capability Map: Where the New Generation Excels
1.1 Long Context: From “Fits” to “Works Well”
Early long-context claims were mostly about parameter-level capacity. What actually separates models in evaluation is a few practical behaviors:
- Information retrieval: finding a specified condition, constraint, or data point within long material.
- Cross-section correlation: linking premises scattered across different chapters.
- Consistency: keeping terminology, numbering, and conclusions from contradicting each other in a long output.
- Resistance to interference: not being led astray when material contains irrelevant or conflicting information.
A few engineering reminders:
- The context window limit is not the same as the usable budget. Longer inputs mean higher latency and cost, and a greater chance that “middle content gets ignored.”
- Long documents suit a layered workflow: understand the whole first, then read specific parts closely. You can use retrieval to locate candidate passages within long material, then hand them to the model for focused reasoning.
1.2 File Understanding: Structured Extraction Is What Makes It Work
File understanding usually covers common formats like PDF, Word, spreadsheets, scans, and images, but its engineering value depends on whether it can reliably produce structured results. You can require output to follow a unified schema, such as JSON Schema:
{"type": "object","properties": {"title": { "type": "string" },"parties": {"type": "array","items": { "type": "string" }},"amount": { "type": "number" },"due_date": { "type": "string", "format": "date" }},"required": ["title", "parties", "amount", "due_date"]}
A program only needs to validate whether the output matches the schema; anything that fails is automatically routed to a retry or human review. Only then can the model fit into formal workflows such as approval, archiving, and risk control.
1.3 Content Writing and Data Analysis: Collaboration, Not Replacement
For content writing, models are good at building outlines, producing multiple rewrite versions, unifying style, and maintaining consistency across long text. For data analysis, a common approach is to have the model generate query statements or analysis scripts, have a program execute them in a controlled environment, and feed the results back to the model for interpretation. Two principles run throughout:
- Let the model handle “understanding and expression,” and let the program handle “computation and validation.”
- Numeric conclusions must come from reproducible computation, never from the model’s direct inference.
1.4 Long-Horizon Tasks: From Single Generation to a Multi-Step Closed Loop
Long-horizon tasks are the most noteworthy advance of this generation. Key metrics include:
- Task completion rate: the share of end-to-end runs that finish without interruption or drifting off-goal.
- Self-correction rate: whether the model can locate the cause of an error and fix it.
- Token and step consumption: the cost of reaching the same quality.
- Human intervention rate: the share of steps that need to be taken over by a human.
Long-horizon capability has real engineering value only when completion and self-correction rates clearly improve while cost stays under control.
2. The Dual-Mode Mechanism: Choosing Between Reasoning and Non-Reasoning Mode
These models generally offer two invocation modes, commonly summarized as “slow thinking / fast thinking”:
- Reasoning mode (slow thinking): unfolds a longer chain of thought before producing an answer. Suited to tasks that need repeated verification, such as mathematical derivation, multi-constraint scheduling, and complex code debugging.
- Non-reasoning mode (fast thinking): generates the answer directly, with low latency and stable consumption. Suited to tasks with relatively fixed patterns, such as classification, summarization, rewriting, and information extraction.
This generation shows a noteworthy phenomenon: non-reasoning mode increasingly behaves like “adaptive reasoning with a low thinking budget.”
- Simple questions are often solved within a few thousand tokens.
- Complex tasks may hide a long reasoning process, with output climbing to 20,000 or even 30,000 tokens.
- Because non-reasoning mode usually has a lower output cap, a substantial share of complex requests get truncated, directly causing incomplete answers and program parsing failures.
So the assumption that “non-reasoning mode is always cheaper” no longer holds. The engineering recommendation is to run both tracks in parallel:
- Use non-reasoning mode by default for clear, templatizable tasks.
- Once features of multi-step reasoning, multi-constraint solving, or complex code repair are detected, automatically switch to reasoning mode.
- Track success rate and average consumption for each mode separately, and decide routing thresholds with data rather than intuition.
3. Reasoning Overhead: The Bill Behind Better Capability
3.1 A Typical Failure Pattern: Running to the Budget Ceiling
Complex logic problems often involve “multiple solutions and multiple branches,” such as scheduling that satisfies several constraints, solving Sudoku, variants of Sudoku with extra conditions, or deriving all solutions of a system of equations. Here the model must systematically enumerate possibilities, rule them out one by one, and verify the candidates. The new generation has improved markedly at exploring the solution space: earlier models often gave only partial solutions or missed branches, while the new models can find and verify candidates more fully. The cost is just as direct:
- Reasoning mode keeps advancing until it hits the preset thinking budget cap.
- On the same problems, the output consumption of complex logic problems can reach more than three times that of the previous generation.
- For routine tasks such as writing and Q&A, overall consumption is roughly on par with the previous generation.
In other words, the token-consumption structure is diverging: simple tasks stay flat, complex tasks surge.
3.2 The Efficiency Gap With Leading International Models
On the same batch of problems that all models pass with full marks, some leading international models may consume only half — or as little as one-sixth — of what the new model does. This says two things:
- On capability, the new model has entered the first tier for long-horizon tasks.
- On efficiency, there is still a clear gap between “thinking a problem through” and “thinking it through with fewer tokens.”
For callers, this gap ultimately shows up as differences in billing and response latency. Credit systems or monthly packages can smooth the unit price to some extent, but they can’t erase the consumption gap. In the next generation’s evolution, improving “thinking efficiency” may matter more than simply increasing “thinking depth.”
3.3 Who Consumes the Tokens: A Four-Stage Breakdown
Token consumption in reasoning mode can be split into four segments:
- System prompt and tool definitions: carried again on every round.
- Context and history: grows with the number of dialogue turns and files.
- Chain of thought: the main source of increase in reasoning mode.
- Final output: structured reports and code comments also lengthen the output.
Measure before optimizing: instrument each call to record the share of each segment, then decide which one to compress. Compressing the system prompt based on experience alone often yields limited results.
4. Cost Estimation: A Clear Accounting of Reasoning Overhead
4.1 A Small Unit-Price Increase Doesn’t Necessarily Scale the Bill
In reasoning mode, the output price may rise slightly from 21 to 27 per million tokens, an increase approaching 30%. But whether the total cost rises also depends on two factors:
- Whether the chain-of-thought algorithm has been optimized to consume fewer thinking tokens for the same task.
- Whether the caching mechanism can reuse repeated context.
So selection shouldn’t look at unit price alone, but at “the total cost of completing the same task.”
4.2 Task-Level Cost Accounting
Break cost down to the task level and observe both the mean and the median:
- Use the mean to gauge the overall budget.
- Use the median to gauge the typical request experience.
- Use P95 to gauge the worst-case latency and billing spikes.
The function below shows how to estimate per-call and batch cost from token usage:
def estimate_cost(input_tokens: int, output_tokens: int,in_price: float = 0.6, # input price per million tokensout_price: float = 27.0, # output price per million tokenscache_hit_ratio: float = 0.0,cached_in_price: float = 0.2) -> dict:"""Estimate call cost from token usage; replace parameters with actual pricing."""cached_tokens = int(input_tokens * cache_hit_ratio)fresh_tokens = input_tokens - cached_tokenscost = (fresh_tokens * in_price+ cached_tokens * cached_in_price+ output_tokens * out_price) / 1_000_000return {"cost_yuan": round(cost, 6),"total_tokens": input_tokens + output_tokens}
4.3 Thinking Budget and Cost Optimization
Five common control measures:
- Set different output caps for different task tiers: 3K for summarization, 16K for analysis, and 32K+ for complex reasoning.
- In reasoning mode, trim the system prompt first, reuse a stable prefix, and enable context caching.
- Summarize and compress long documents first, feeding only the relevant passages into reasoning.
- Write “verify before outputting” into the prompt to reduce lengthy, ineffective self-deliberation.
- Set up consumption monitoring to automatically alert on any request whose single-task token count exceeds the threshold.
5. Evaluation Design: Don’t Let Scoring Rules Hide Real Capability
The new models have also exposed problems tied to scoring rules in public evaluations — worth studying for any team that evaluates models.
5.1 Three Typical Distortions
- Non-reasoning mode gets truncated: if the output cap is set at 15,000 tokens and nearly half of complex tasks exceed it, then under a “score zero if over the limit” rule, these problems can’t be scored and can only be skipped or listed separately. At that point, the median score of non-reasoning mode can neither represent its true level nor be compared directly with reasoning mode.
- Reasoning mode hits the cap: for a few problems, repeated tests all produced output exceeding an 80,000-token cap, so they can only be counted as zero, directly dragging down the median score of reasoning mode. These problems are often the most valuable hard ones; a zero doesn’t mean “can’t do it,” only “didn’t finish.”
- Consumption is disconnected from score: if you grade only on whether the answer is correct, then among models that all get full marks, token consumption can differ by several times, completely masking overall cost-effectiveness.
5.2 A Reusable Evaluation Framework
Record the following fields in evaluation:
- Task type, difficulty, and tier.
- Invocation mode.
- Whether it hit the cap, and whether the cap was hit during the thinking stage or the output stage.
- Input/output token counts.
- Latency and score.
- Whether it passed automated validation or unit tests.
Example scoring function:
from statistics import mean, mediandef grade(result: dict, cap: int = 16_000) -> dict:"""Unified scoring: over-limit results are excluded from valid samples and tracked separately."""truncated = result["finish_reason"] == "length"valid = not truncatedscore = result["score"] if valid else Nonereturn {"valid": valid,"score": score,"truncated": truncated,"output_tokens": result["output_tokens"],"hit_cap": result["output_tokens"] >= cap,"cost": result.get("cost", 0.0),}def summarize(records: list[dict]) -> dict:valid = [r for r in records if r["valid"]]return {"valid_samples": len(valid),"truncated_samples": sum(r["truncated"] for r in records),"truncation_rate": round(sum(r["truncated"] for r in records) / len(records), 3),"mean_score": round(mean([r["score"] for r in valid]), 3),"median_score": round(median([r["score"] for r in valid]), 3),"mean_output_tokens": round(mean([r["output_tokens"] for r in records])),"mean_cost": round(mean([r["cost"] for r in records]), 6),}
Building on this, two more conventions:
- Unified cap: all models in the same leaderboard use the same output cap, or set it to each model’s officially recommended value, and note this in the leaderboard.
- Report both metrics: present the score rate on valid samples and the truncation rate together. If the score rate is ≥95% but the truncation rate is ≥40%, it means capability has been reached but not effectively bounded, and should be read as “the capability ceiling is limited by engineering constraints,” not “insufficient capability.”
6. Coding and Agent Capability: From One-Shot Generation to Real Projects
Coding ability usually breaks into three layers:
- One-shot generation: single functions, single pages, common algorithm problems.
- Repository-level understanding: reading across files, locating call relationships, and following project conventions.
- Autonomous execution: running code in a sandbox, reading errors, locating causes, and repeatedly fixing until tests pass.
Many models do well at the first layer but perform mediocrely in real projects, lacking effective debugging and self-correction. The new generation has advanced significantly in agentic coding, and the quality of routine front-end and back-end development tasks is close to “ready to enter the development workflow.” Still, production use requires attention to a few points:
- Closed-loop validation: use unit tests, type checking, and static analysis as the agent’s “judge” so that fixes have something to rely on.
- Sandbox isolation: run generated code in a container or isolated environment, restrict network and file-system permissions, and prevent accidental deletion or data leakage.
- Auditable changes: submit all modifications as patches or diffs, keep the original version, and make rollback easy.
- Context engineering: feed only relevant modules and interface definitions into the context to reduce interference from unrelated code.
7. Access Methods and Engineering Practices
Models can be accessed in several ways: open API calls, plugins for AI coding tools, direct chat via web or client, and on-premises deployment enabled by open weights. When selecting, evaluate across these dimensions:
| Dimension | What to Focus On |
|---|---|
| Compliance and data | Whether data can leave its domain; whether on-premises deployment meets requirements |
| Latency and throughput | First-token latency; rate-limiting strategy under high concurrency |
| Cost structure | Separate pricing for input/output/caching; whether volume or credit packages exist |
| Stability | Timeout retries, fallback strategies, and multi-version canary capability |
| Observability | Call-chain logs, token-usage monitoring, and error-rate tracking |
When deploying to the cloud, you can combine general cloud capabilities to build a closed loop:
- Use a container platform to host model services and the agent execution environment, scaling on demand.
- Use object storage to archive input documents, generated results, and evaluation datasets.
- Use a message queue to smooth peaks and fill valleys, converting long tasks into asynchronous processing.
- Use a logging service to record each request’s mode, token consumption, and latency.
- Use monitoring and alerting to set thresholds for truncation rate, error rate, and cost anomalies.
If you access the Qianfan platform from Baidu AI Cloud, you can build a unified model-invocation and evaluation pipeline by combining these general capabilities on top of the model service.
8. Summary and Selection Checklist
On long-horizon tasks, the new generation of open-source models behaves more like “an executor that keeps the job done,” with notably stronger reasoning and solution-space exploration, and coding ability now in the usable range. Meanwhile, the cost pressure from reasoning mode “maxing out the budget,” output inflation in non-reasoning mode, and score distortion caused by evaluation conventions are all real constraints on engineering adoption.
Before selecting, confirm each item:
- Is the task mainly multi-step reasoning? If so, evaluate reasoning mode first and set a sufficient output cap.
- Are there many templatizable tasks? If so, split them off with non-reasoning mode and monitor its truncation rate.
- Have you done task-level cost accounting? At minimum, track mean, median, and P95 consumption.
- Are coding tasks backed by tests and a sandbox? Agent capability without closed-loop validation is hard to deliver reliably.
- Has the evaluation unified the cap, recorded the truncation rate, and distinguished modes? Otherwise scores aren’t comparable.
- Is there an observability system? Logs, monitoring, and alerting determine whether problems can be caught in time.
Overall, this generation has clearly expanded the boundaries of capability. Turning capability into stable productivity depends on whether the caller can use scientific evaluation, sensible routing, and fine-grained cost control to turn “stronger” into “more cost-effective and more reliable.”
