AGENT / ROUTING BUDGET
Loading Math.js...

Model the mix before you ship

Route the workload. Read the tradeoff.

Compare three declared model lanes on the units that shape a real agent budget: tokens, traffic, route share, price, and latency.

Assumption-led, not live data
The source names qualitative positioning but provides no current price sheet or SLA. Enter values you can defend; this lab computes the consequences.

Workload and route mix

Prices are USD per million tokens. Latency is an assumed average in milliseconds.

Sol

Terra

Luna

Canonical result

No route yet

The useful budget view appears before export.

--
daily blended spend
--blended cost / request
--30-day spend
--weighted latency
--route share total
--all-Sol daily baseline
--spend reduction
How the blend movesEach lane cost = share x ((input tokens / 1M x input price) + (output tokens / 1M x output price)). Daily spend = blended request cost x requests/day. Latency is the share-weighted average.

Interpretation and limits

Use this to compare a scenario, not to certify a provider. Prices, traffic, tokens, and latency are declared assumptions. The model excludes quality, retries, cache hits, queueing, outages, and provider availability. A lower spend result does not establish equal capability.

A declared routing mix blends hypothetical cost and latency

Read the explanation

The sample assigns ten thousand daily requests, twelve hundred input tokens and five hundred output tokens each. Sol prices are five dollars per million input and fifteen output, Terra two and six, Luna one and three. Their per-request costs are zero point zero one three five, zero point zero zero five four, and zero point zero zero two seven dollars. At twenty thousand pixels per dollar the bars measure two hundred seventy, one hundred eight and fifty four. These are user supplied scenario prices, not current provider rates or equal quality guarantees. Routing twenty percent to Sol, thirty to Terra and fifty to Luna yields weighted per-request contributions zero point zero zero two seven, zero point zero zero one six two, and zero point zero zero one three five. Their sum is zero point zero zero five six seven. Daily spend is fifty six point seven dollars versus one hundred thirty five all Sol, saving seventy eight point three or fifty eight percent. At two pixels per dollar the blended, baseline and savings bars measure one hundred thirteen point four, two hundred seventy and one hundred fifty six point six. The month is fixed at thirty days, giving seventeen hundred one dollars. Retries, caching and outages are absent. Latency assumptions six hundred fifty, four hundred and two hundred twenty milliseconds are weighted by the same shares. Contributions are one hundred thirty, one hundred twenty and one hundred ten milliseconds, totaling three hundred sixty. At one pixel per millisecond those three bars show the contributions directly. This average is not a measured service-level promise or percentile. The application requires exactly Math.js version thirteen point two point zero and shares totaling one hundred percent. Its local library file is absent in this snapshot, so calculation and export fail closed. Native restore and reset preserve that failure rather than inventing a successful budget result.

Agent Routing Budget Lab

How do model routing allocations and token distributions determine blended request costs, monthly budgets, and turnaround latency?

Agent architectures route queries across distinct model tiers to balance per-call operating expenses against turnaround latency. This lab models a three-lane workload (Sol, Terra, Luna) with user-defined input and output token counts, per-million token pricing, and response delays. Multiplying each tier's per-call expense and turnaround duration by its allocated routing percentage yields the blended cost per request, daily and 30-day projected spends, and overall latency, comparing the composite mix to an all-Sol baseline.

Calculations assume static, user-declared prices and fixed average latencies rather than real-time provider SLAs or dynamic queue times. The model presumes identical execution quality across all three lanes and excludes prompt caching discounts, token context accumulation across multi-turn agent loops, query retries, rate limits, and provider failover events.

Try a worked example

The default sample assumes 10,000 requests per day with 1,200 input tokens and 500 output tokens. Routing 20% to Sol ($5/$15 per M tokens, 650 ms), 30% to Terra ($2/$6, 400 ms), and 50% to Luna ($1/$3, 220 ms) sums to 100%. Sol costs $0.0135 per request, Terra costs $0.0054, and Luna costs $0.0027. Weighting each by its route share yields a blended cost of $0.00567 per request ($56.70 daily spend, $1,701 for 30 days) and 360 ms weighted latency, achieving a 58.0% cost reduction compared to the $135.00 daily baseline if all queries routed to Sol.

Mathematical formulation of blended cost and latency

For each model lane i, the per-request cost is calculated as (inputTokens / 1,000,000 * inputPrice_i) + (outputTokens / 1,000,000 * outputPrice_i). Each lane's contribution to the blended request cost is (routeShare_i / 100) * perRequestCost_i. Blended cost per request is the sum of these lane contributions across all routes.

Daily spend equals blended request cost multiplied by total requests per day, and monthly spend is projected across 30 days. Weighted latency is computed as sum((routeShare_i / 100) * latency_i). Baseline spend calculates total daily cost if 100% of traffic ran on the Sol tier, with percentage savings evaluated as (1 - dailySpend / baselineSpend) * 100.

Practical routing considerations in agent systems

In production multi-agent pipelines, simpler classification, routing, and tool-dispatch queries are typically routed to smaller, lower-latency models (such as Luna or Terra), while complex code generation or multi-step reasoning tasks route to flagship models (such as Sol). However, actual savings depend heavily on prompt caching efficiency and whether lower-capacity models require secondary retry or self-correction turns.

Super generates helpful tools and automates fact-checking across the internet proactively. If you enjoyed this tool, build your own with Super and share it with a friend.