How to Estimate LLM Quotas: A Practical Guide to Multi-Model Tiered Scheduling
On unified model-serving platforms, developers often face a shared resource constraint: the platform issues a batch of credits each cycle, and every model call draws from the same credit pool. Consumption rates vary dramatically across models—using the wrong model can mean the same quota delivers only a tenth of the workload. This article uses personal call records to fit consumption rates, then walks through quota cost estimation and a multi-model tiered scheduling strategy.
On a unified model-serving platform, developers often run into a familiar resource constraint: the platform grants a batch of credits per cycle, and all model calls draw from the same credit pool. Consumption rates differ sharply between models. Pick the wrong model, and the same quota may only accomplish one-tenth of the work. This article fits consumption rates against personal call records, then discusses how to estimate quota costs and how to build a multi-model tiered scheduling strategy.
1. Establish a Unified Billing Baseline
The numbers in this article are based on the following assumptions:
- 60,000 credits are issued per 5-hour window.
- The weekly cap is 600,000 credits, so at most 10 full windows can be used per week.
- The credit cost of a single call is linear in input tokens, output tokens, and cache-hit tokens.
Rates are recorded as “credits per million tokens” and divided by one million to get the per-token consumption rate. The four tiers used throughout this article are:
- Flagship reasoning tier: input 80,000, output 400,000.
- Mid-tier reasoning: input 32,000, output 112,000.
- Fast tier: input 4,000, output 8,000.
- Lite tier: input 2,000, output 2,000.
These rates are reverse-engineered from personal measurements. The platform may adjust them at any time, so they should not be treated as official pricing.
2. Where the Consumption Rate Differences Come From
Three factors drive the differences.
- Model size. More parameters mean higher compute cost per inference, which the platform converts into a higher credit price. In the table above, the flagship tier’s output rate is 200x the lite tier’s (400,000 vs. 2,000).
- Input and output are priced differently. Output tokens must be generated auto-regressively one by one, which is far more expensive than the parallel processing of input tokens. In the table, output is roughly 5x the input price for the flagship and mid tiers, while the fast and lite tiers charge the same for both.
- Cache hits. When a request prefix hits the cache, the input portion is billed at a lower rate. Multi-turn conversations and agent loops have highly repetitive prefixes, so the cache hit rate sets the floor for actual cost.
3. Reverse-Engineering Consumption Rates from Call Records
The platform’s price list may not be public, but changes in the credit balance are observable. The approach: record the input tokens, output tokens, cache-hit tokens, and the credit balance before and after each call, then use least squares to fit the consumption rates.
Assume the credit cost of a single call is:
cost = r_in * tokens_in + r_out * tokens_out + r_cache * tokens_cached
The code below demonstrates the workflow with simulated data. The “true” rates are preset to verify that the fitting method can recover them—they do not represent any real platform’s records:
import numpy as nprng = np.random.default_rng(42)n = 40 # simulate 40 recordstokens_in = rng.integers(5_000, 120_000, n)tokens_out = rng.integers(500, 10_000, n)tokens_cached = rng.integers(0, 90_000, n)X = np.column_stack([tokens_in, tokens_out, tokens_cached]).astype(float)true_rates = np.array([0.08, 0.40, 0.0016]) # assumed credits per tokeny = X @ true_rates + rng.normal(0, 20, n) # add noise to simulate rounding errorprint("Matrix rank:", np.linalg.matrix_rank(X), "(should equal the 3 unknowns)")rates, *_ = np.linalg.lstsq(X, y, rcond=None)y_pred = X @ ratesss_res = np.sum((y - y_pred) ** 2)ss_tot = np.sum((y - y.mean()) ** 2)print("Fitted rates (credits/token):", rates)print("R2:", round(1 - ss_res / ss_tot, 4))print("Residual std:", round(np.std(y - y_pred), 2))
When fitting real records, keep the following in mind:
- Sample size. With 3 unknowns, collect at least 30 records covering different input/output ratios. If all records have nearly the same ratio, the matrix becomes near-singular and the three rates cannot be separated. If the matrix rank is below 3, the fit is unusable.
- Consistent definition. Be clear about whether
tokens_inincludes the cache-hit portion, and keep the definition consistent throughout collection. - What R² means. R² only indicates how well the model fits the sample. With low noise and a correct definition, R² approaches 1—but that only shows a linear model holds for this batch of data. It does not prove the platform’s billing rules will never change.
- Residual checks. If residuals are large, first check for missed calls or whether the platform adjusted rates partway through the collection period.
4. Estimating Quota Capacity
Once you have the rates, you can estimate how many tokens of work a quota can deliver. Assume a task is 80% input and 20% output, ignoring cache for now:
usable tokens = total credits / (0.8 * r_in + 0.2 * r_out)
Plugging in the rates above, the capacity of 60,000 credits per 5-hour window is:
| Tier | Weighted rate (credits/token) | Usable tokens (5-hour window) | Usable tokens (weekly 600K credits) |
|---|---|---|---|
| Flagship reasoning | 0.144 | ~417K | ~4.17M |
| Mid-tier reasoning | 0.048 | ~1.25M | ~12.5M |
| Fast tier | 0.0048 | ~12.5M | ~125M |
| Lite tier | 0.002 | ~30M | ~300M |
With the same 60,000 credits, the lite tier processes roughly 72x more tokens than the flagship tier. The weekly 600K cap is tighter than the per-window limit, so weekly planning should be based on the last column. If every task goes to the flagship tier, a week’s quota will be exhausted quickly.
5. How Much Does Caching Increase Capacity?
The previous section ignored caching. Suppose cache-hit input is billed at 2% of the normal input rate, with hit rate h. Then the effective input rate is the normal rate multiplied by (1 - 0.98h). These figures are based on personal measurements; the actual ratio depends on the platform’s rules.
| Tier | No cache | 50% cache hits | 80% cache hits |
|---|---|---|---|
| Flagship reasoning | ~417K | ~533K | ~639K |
| Mid-tier reasoning | ~1.25M | ~1.69M | ~2.15M |
| Fast tier | ~12.5M | ~18.56M | ~26.2M |
| Lite tier | ~30M | ~49.3M | ~80.5M |
Caching benefits the fast and lite tiers the most, because input makes up a large share of their cost and their unit prices are low. For stable content such as system prompts, tool definitions, and long documents, place it at the front of the prompt to maximize prefix hits. Put content that changes per request at the end, and reuse conversation context instead of rebuilding it every turn.
6. Tiered Routing and Fallback Implementation
The core idea of tiered scheduling: use the flagship tier for planning and final review, the mid tier for complex reasoning, the fast tier for code generation and modification, and the lite tier for formatting and classification. The rationale is that expensive models are called rarely but deliver high value, while cheap models handle the high-volume execution work.
The routing function handles three things: selecting a tier by task type, checking whether the remaining balance is sufficient, and downgrading or queuing when it is not.
import loggingfrom dataclasses import dataclasslogger = logging.getLogger("quota_router")RATES = { # credits/token, reverse-engineered from measurements; recalibrate regularly"flagship": {"in": 0.08, "out": 0.40},"mid_tier": {"in": 0.032, "out": 0.112},"fast_tier": {"in": 0.004, "out": 0.008},"lite_tier": {"in": 0.002, "out": 0.002},}CACHE_FACTOR = 0.02 # billing ratio for cache-hit input (personal measurement; check platform rules)SAFETY_MARGIN = 1.2 # reserve 20% headroom for estimation errorLONG_TASK_TOKENS = 200_000 # tasks with longer inputs are not sent to the weakest tierBASE_TIER = {"planning": "flagship","final_review": "flagship","reasoning": "mid_tier","debug_hard": "mid_tier","code_gen": "fast_tier","refactor": "fast_tier","format": "lite_tier","summary": "lite_tier","classify": "lite_tier",}DOWNGRADE = {"flagship": "mid_tier","mid_tier": "fast_tier","fast_tier": "lite_tier","lite_tier": None,}class QuotaExhausted(Exception):"""Credits are insufficient for every available tier."""@dataclassclass Task:type: strest_in: int # estimated input tokens; caller fills in the historical median if unknownest_out: int # estimated output tokenscache_ratio: float = 0.0 # estimated fraction of input served from cache, between 0 and 1critical: bool = False # critical tasks are never silently downgradeddef estimate_credits(tier, task):rate = RATES[tier]cached = task.est_in * task.cache_ratiofresh = task.est_in - cachedreturn (fresh * rate["in"]+ cached * rate["in"] * CACHE_FACTOR+ task.est_out * rate["out"])def route(task, pool_balance):"""pool_balance is the remaining credits in the shared pool across all tiers."""if task.est_in < 0 or task.est_out < 0:raise ValueError("Token estimates must not be negative")if not 0 <= task.cache_ratio <= 1:raise ValueError("cache_ratio must be between 0 and 1")tier = BASE_TIER.get(task.type)if tier is None:logger.warning("Unknown task type %s, falling back to lite_tier", task.type)tier = "lite_tier"if task.est_in > LONG_TASK_TOKENS and tier == "lite_tier":tier = "fast_tier"while tier is not None:need = estimate_credits(tier, task) * SAFETY_MARGINif need <= pool_balance:return tier, needlogger.info("%s needs ~%.0f credits, balance %.0f", tier, need, pool_balance)if task.critical:breaktier = DOWNGRADE[tier]raise QuotaExhausted("Insufficient credits; the task should be queued for the next window")
A few implementation notes:
- Recalibrate rates regularly. The rates in
RATEScome from reverse engineering and may drift when the platform adjusts pricing. Re-run the least-squares fit periodically with fresh records. - Estimate conservatively.
SAFETY_MARGINreserves headroom because token estimates are rough; underestimating output length is the most common failure mode. - Protect critical tasks. A task marked
criticalraisesQuotaExhaustedinstead of silently dropping to a weaker tier, so quality-sensitive work never degrades without an explicit signal.
With fitted consumption rates, capacity estimates, and a routing layer in place, the same weekly quota can support a far larger workload—high-value calls go to expensive tiers, while bulk execution stays on cheap ones.
