Serve your agents fresh data at Redis speed.

Learn how
Platform
Solutions
Resources
Partners

Blog

Token-budget-aware LLM reasoning: cut costs in 2026

July 28, 202610 minute read
Jeff Mills
Jeff Mills
Summarize with AI

Reasoning models think before they answer, and those reasoning tokens are usually part of what you pay for. They're billed as output tokens, the expensive kind, and a single request can generate a few hundred of them depending on the problem. If your costs jumped after you switched to a reasoning model, this is usually why.

Token-budget-aware reasoning is the response: match the tokens a model spends thinking to the difficulty of the problem, and stop paying for reasoning you don't need. This guide covers what token-budget-aware reasoning is, which prompt-level techniques cut reasoning spend, why prompting alone breaks down, and how caching, routing, and memory reduce costs at the architecture level.

What is token-budget-aware reasoning?

Token-budget-aware reasoning means giving an LLM a token budget sized to each problem's complexity. A simple lookup gets a short answer. A genuinely hard problem gets room to think. Reasoning traces from current LLMs are often unnecessarily long, and you can compress them by baking a reasonable budget into the prompt, an approach called token-budget-aware LLM reasoning (TALE). The catch: the budget has to fit the problem. Set it too tight and things get worse, as we'll see below.

Why reasoning tokens dominate cost

Reasoning tokens deserve their own budget because of how they're billed. Output tokens cost six times the input rate on OpenAI's standard-context models. For Gemini, thinking tokens are billed at the output token rate. Reasoning tokens are the expensive kind, and reasoning models generate a lot of them.

How many is a lot? Reasoning models can spend many times more tokens than conventional ones to reach the same answer, and the overspend concentrates on easy problems. On one think-evaluation benchmark, some reasoning models burned over 900 tokens answering "2+3=?".

Chain-of-thought & its overhead

Chain-of-thought (CoT) prompting asks a model to show its work before giving a final answer. It tends to help accuracy on multi-step problems, but every step is an output token on your bill. So how much of that reasoning is real thinking, and how much is filler?

That depends on the task, and Chain of Draft offers a way to measure it. The technique caps each reasoning step at five words or fewer, so wherever accuracy survives the squeeze, the words it removed weren't doing much work.

On commonsense and symbolic problems, the shorter reasoning lost nothing. Claude 3.5 Sonnet answering sports-understanding questions dropped from 190 tokens under CoT to 14 under Chain of Draft, 7.6% of the tokens, and accuracy rose from 93.2% to 97.3%. On a coin-flip task, both models stayed at 100% accuracy while cutting tokens by 68% to 86%.

Arithmetic was the exception. On GSM8K, both models traded roughly four points of accuracy for an 80% token saving:

  • GPT-4o fell from 95.4% to 91.1%, with output dropping from 205 tokens to 44.
  • Claude 3.5 Sonnet fell from 95.8% to 91.4%, with output dropping from 190 tokens to 40.

What makes this useful is that the two models tracked each other closely on every task tested. The variable worth testing before you compress anything is the kind of problem, not the model answering it.

Redis Iris

Redis Iris serves agent context in milliseconds

Redis Iris connects memory, live data, and retrieval in one place.

Prompt-level techniques & their limits

Given all that overhead, the first wave of fixes lived in the prompt itself: tell the model how much to think, or how tersely to think. Both are one-line changes, which is why teams reach for them first.

Budget estimation by complexity

The problem with a fixed budget is that no single number fits every query. A budget tight enough to save tokens on "what's 2+3?" will strangle a multi-step math problem, and a budget loose enough to handle the math problem wastes tokens on the easy one. Budget estimation solves that by letting the model size its own budget per query before it starts reasoning.

TALE Estimation + Prompting (TALE-EP), the estimation variant of TALE, works in two phases:

  1. Estimate: A zero-shot prompt asks the model to estimate the minimum tokens it needs for the problem.
  2. Constrain: That estimate goes into the reasoning prompt as an explicit budget.

Across seven datasets on GPT-4o-mini, TALE-EP reported a 67% average reduction in output tokens with less than a 3% accuracy drop. On GSM8K, accuracy actually went up, from 81.35% to 84.46%, as average output fell from 318 tokens to 77. Less overthinking is the likely reason: the same work ties Vanilla CoT's accuracy drop on GSM8K-Zero to long reasoning piling complexity on simple problems.

Blunter tricks work too, with caveats. Concise chain-of-thought just tacks a "be concise" instruction onto a standard CoT prompt. For GPT-3.5 and GPT-4, it reported roughly a 49% average reduction in response length with little effect on most tasks. But on math problems, GPT-3.5 took a 28% performance penalty, a reminder that "just be shorter" isn't free when the task actually needs the reasoning.

Why prompting alone breaks down

Tight budgets are where prompt-level tricks start to crack. In one TALE evaluation, a 50-token budget cut a problem's output from 258 tokens to 86. Squeeze that same problem down to a 10-token budget and it produced 157 tokens, nearly twice as many. When a model can't meet the constraint, it tends to shrug it off and revert to longer reasoning. Smaller models tend to be worse at respecting budgets that larger models handle fine.

To make budgets more reliable, some providers now expose them as API parameters instead of leaving it to prompt wording:

  • Gemini offers a thinking budget parameter, where 0 disables thinking and -1 lets the model adjust the budget to the request's complexity.
  • Claude retired manual thinking budgets in its newer models: budget_tokens returns a 400 error on Opus 4.7 and later, where thinking is adaptive and model-controlled. An effort parameter controls thinking depth instead, alongside an advisory task budget for capping spend across a full agent loop.
  • OpenAI goes further, telling devs to avoid chain-of-thought prompts entirely with its reasoning models, since they reason internally.

Prompt-level budgeting still earns its keep. But even a well-budgeted response racks up output-token costs unless caching or provider discounts step in. To cut costs further, you have to look past the prompt.

A bigger lever: stop paying for the same reasoning twice

Prompt budgets shrink each response. They don't stop you from paying for the same response over and over. And production traffic repeats itself constantly: in one analyzed workload, over 30% of LLM queries were semantically similar to earlier ones. If a third of your traffic is asking the same question in different words, you're paying to re-derive answers you already have on file.

Semantic caching puts a stop to that:

  • Store: Save each LLM response with a vector embedding of the prompt that produced it.
  • Match: When a new prompt comes in, compare its embedding to the cached ones using cosine similarity.
  • Serve or call: If similarity clears a threshold, return the cached response. Otherwise, call the model.

On a hit, there's no inference call and no reasoning tokens to pay for. In one semantic cache implementation, hit rates ranged from 61.6% to 68.8% across query categories, with positive hit accuracy between 92.5% and 97.3%. That accuracy is what makes the skipped calls actually useful—not just cheap.

This is where infrastructure enters the picture, and if you're running AI apps, you may already have Redis in the stack for it. Redis Iris is a real-time context engine for AI agents, built as four fully-managed services on Redis Cloud, with Redis Search as the fast retrieval layer underneath. One of those services, Redis LangCache, handles semantic caching for you: a managed service in public preview that takes care of vector embedding generation and vector search on each prompt. In Redis benchmarks, LangCache reported up to 73% lower LLM inference costs and 15x faster responses on cache hits.

Routing & memory: budgeting across the whole app

Caching handles the queries you've seen before. Routing and memory budget the ones you haven't.

Complexity-based routing

Complexity-based routing sends each query to the cheapest model that can handle it, rather than defaulting to your most capable and most expensive one. Two designs are common:

  • Pre-inference routers make a single decision before any model is called, based on the query itself.
  • Cascades try the cheap model first and escalate to a bigger one only when confidence falls below a threshold.

Both patterns show meaningful savings in the research:

  • A pre-inference router trained on preference data reported cost reductions of up to 85% while maintaining 95% of GPT-4 performance on MT Bench.
  • A cascade router reported saving up to 98% of the best individual LLM API's inference cost while matching its performance on the tested tasks.

These figures depend heavily on the model pair and query mix, but the pattern repeats across studies: a lot of traffic doesn't need the big model.

You can build this pattern on the same platform. The RedisVL SemanticRouter performs k-nearest neighbor (KNN)-style classification over a set of route references, matching queries by meaning rather than exact keywords, so your app can steer simple queries toward lighter models.

Persisting reasoning as memory

Routing helps your app choose which model reasons. Memory helps the model avoid re-deriving what it already figured out, for two reasons:

  • Turn-by-turn bloat: Many multi-turn agents re-send conversation history on each API call, so token cost can grow roughly quadratically with the number of turns.
  • Session-to-session amnesia: Without persistent memory, an agent re-derives conclusions it reached in earlier sessions.

Persisting reasoning helps address both. Reflexion agents, for example, store reflections in an episodic memory buffer that guides later trials. Caching and memory attack the same waste at different levels: caching across similar prompts, memory across an agent's own sessions.

Redis Agent Memory applies this idea with a dual-tier memory architecture:

  • Session memory holds the current session's scratchpad and recent turns.
  • Long-term memory uses vector search across conversations, with facts, preferences, and episodic events stored as JSON documents with vector embeddings.

The memory layer lets agents retrieve past context instead of spending reasoning tokens to rebuild it.

How to measure token efficiency in production

None of these levers pays off if you can't see where tokens go. The OpenTelemetry GenAI semantic conventions, still in development, define token usage attributes that give you a shared vocabulary for tracking spend:

  • gen_ai.usage.input_tokens for prompt tokens.
  • gen_ai.usage.output_tokens for response tokens.
  • gen_ai.usage.reasoning.output_tokens for reasoning spend on its own, the one that tells you if a reasoning model is running away with your budget.

From those counts, two derived metrics tend to matter most: the output token ratio (output over total tokens, which climbs when prompts or reasoning get verbose) and the cache hit rate (hits over queries, the most direct measure of how much inference you're skipping). Pricing isn't in the OpenTelemetry spec, so cost per request is something you track yourself.

Instrumentation like this helps teams find token waste faster. GitHub reduced agent workflow token spend by up to 62% using API proxy instrumentation and a weighted "Effective Tokens" metric that priced output tokens far above cached reads. That visibility lets teams weigh prompt changes, cache behavior, and routing against actual spend instead of guessing.

Cut inference costs with Redis

Prompt-level token budgets are worth adopting, and provider API parameters make them more reliable than prompt instructions alone. But they only shrink each response. The larger savings come from architecture: cache responses to semantically similar queries so you stop paying for repeat reasoning, route easy queries to cheaper models, persist what your agents learn so they don't re-derive it next session, and instrument token usage so you know which lever is working.

These patterns work best when fast vector search sits close to low-latency operational data. Redis Iris puts semantic caching, agent memory, and governed data access on a single real-time context engine. If your app team already runs Redis for sessions or caching, that same platform can serve the semantic cache and agent memory, so you're not adding new systems to cut inference spend. Try Redis Iris to test semantic caching against your own traffic, or talk to our team about reducing inference costs across your AI stack.

Memory

Build agents that remember, not agents that guess

Redis Iris gives every agent fresh context and long-term memory.

Get started with Redis today

Speak to a Redis expert and learn more about enterprise-grade Redis today.