The Real Cost of LLM Subscription Plans: A Practical Measurement Framework
This article breaks down why comparing AI coding subscription plans by their advertised price is misleading. It explains how quota-based billing maps four distinct token types—cache reads, fresh input, cache writes, and output—to hidden weights, and presents an isolation-based experimental method for reverse-engineering those rates. By sampling integer percentage drops, weighting the measured rates against real workloads, and modeling multiple usage scenarios, developers can estimate how much work a plan actually supports and compare plans on a consistent basis.
1. Why Comparing Plan Prices Is Not Enough
Over the past two years, AI coding tools have largely moved to subscription pricing. Users pay a monthly fee and receive a quota pool; model calls are deducted from that pool, and the interface typically shows only a single integer percentage. On the surface, two plans with similar prices should deliver similar value, but the real conclusion is often the opposite.
The reason is that subscriptions are not billed per request or per total token count. Instead, different token types are mapped to different quota weights, and caching behavior and workload composition are layered on top. The result is a hidden billing system.
Outside observers can only see the remaining percentage, not the internal weights. So to judge how much work a plan can actually support, you first have to reverse-engineer those hidden rules. Research groups in the industry have already run relatively objective experiments of this kind, and the core methodology is worth abstracting into a general framework for cost evaluation.
2. Four Token Types and the Isolation Assumption
Mainstream inference services generally classify tokens into four types: cached input (cache hits), fresh input (cache misses), cache writes, and model output. Their compute costs differ dramatically. A cache read is essentially just a memory-bandwidth cost, a fresh input requires recomputing attention over the entire sequence, and output is generated token by token through autoregression, making it the most expensive.
The key design principle for the reverse-engineering experiment is single-variable isolation: consume one token type heavily at a time while driving the other three close to zero, then observe how fast the quota pool drops.
- Measuring cache reads: write a fixed-length context once, then repeatedly reuse the same prefix.
- Measuring fresh input: change the content every time so nothing hits the cache.
- Measuring output: stretch the generation length on its own while keeping the input extremely short.
- Measuring cache writes: repeatedly create new prefixes and watch for extra deductions on the write side.
Illustrative pseudocode:
def probe(quota, kind):start = quota.percent() # the UI shows integers onlyused_tokens = 0while quota.percent() == start: # cross one percentage pointused_tokens += send(kind)return used_tokens # tokens per 1% of quota
3. Sampling Percentage Jumps: Turning an Integer Scale into a Measurement Tool
Because the interface shows only integer percentages, the error from a single request is huge. The practical approach is to run a large number of consecutive requests and record the cumulative tokens consumed as the percentage moves from 17% to 18%, and from 18% to 19%. Averaging over several complete intervals cancels out boundary error and yields “how much quota is consumed per million tokens of a given type.” This is the basic technique for converting coarse display precision into usable measurement precision, and it mirrors the “sample repeatedly and take the median” approach used in performance testing.
4. Weighted Reverse-Engineering: From Rates to Plan Capacity
Once the four rates are measured, weighting them by their proportions in a real workload lets you estimate roughly how many tokens a plan can support. One public measurement uses typical weights of about 97% cached input, about 2.5% fresh input, and about 0.5% output. That works out to only about five thousand output tokens per million tokens—an ideal coding scenario that is extremely cache-friendly.
The weighted calculation can be abstracted as:
cost per unit of quota = Σ(token share of that type × rate of that type)tokens a plan supports ≈ total quota / cost per unit of quota
5. Why the Theoretical Number Is Optimistic
Those proportions assume the cache never expires, tasks run continuously, and the workload is uniform. In reality, caches are invalidated by context changes, session switches, and TTL expiry. Mixed tasks sharply reduce the cache share, and the output share rises significantly in reasoning and refactoring work. This is similar to an EV’s rated range, which comes from continuous, unloaded, low-drag conditions, while real stop-and-go driving often leaves only about seventy percent of it.
A more reliable approach is to model usage by scenario:
{"scenarios": {"long-context Q&A": {"cache_read": 0.90, "fresh": 0.08, "output": 0.02},"everyday completion": {"cache_read": 0.70, "fresh": 0.20, "output": 0.10},"refactoring and reasoning": {"cache_read": 0.40, "fresh": 0.35, "output": 0.25}}}
6. Conclusion and Practical Recommendations
What is certain is that, whether measured by per-token price or by cost per task, subscription plans are not inherently cheaper. The differences come mainly from hidden weights and cache-friendliness, not from the sticker price. The recommendation for developers is to first run small-scale isolation experiments to measure the actual rates for the scenarios you use most, then adjust by your real cache hit rate, and finally compare plans horizontally using a single consistent metric: how much quota a typical completed task consumes. For scenarios that need elasticity and predictability, general-purpose compute and model services such as those offered by Baidu AI Cloud are also worth evaluating, since pay-as-you-go billing is usually easier for capacity planning when workloads fluctuate.
