Understanding the Hidden Billing Mechanics of LLM Subscription Plans
A practical guide to why per-million-token price comparisons fail for LLM subscriptions, how credit systems charge four token categories at different rates, and how to reverse-engineer those rates using single-variable isolation to build a workload-adjusted cost model.
1. Where the Problem Starts: Why “Cost per Million Tokens” Is Misleading
When evaluating the cost-effectiveness of AI coding tools, many people divide the subscription price by a theoretical total token volume to get a “cost per million tokens,” then compare that number across vendors. The flaw in this approach is that subscriptions do not price tokens explicitly. Instead, they maintain a hidden quota system (a credit system). What you see in the UI is an integer percentage, while actual deductions happen across four token categories with completely different weights.
This leads to an absurd outcome: two plans with similar list prices may support workloads that differ by several times, while plans whose list prices differ by several times may end up much closer under real workloads. To understand why, you first have to break the billing model apart.
2. Independent Deduction Rates for Four Token Categories
Most mainstream subscription quota systems split consumption into four categories:
- Fresh input: entirely new context, the most expensive;
- Cache write: writing context into the cache, a one-time overhead;
- Cache read: reusing already cached context, the cheapest;
- Output: generated content, usually priced significantly higher than input.
The key point is that these four are not deducted proportionally to token count. Each has its own independent coefficient for “how many credits are deducted per million tokens.” As a result, consuming the same one million tokens can reduce your quota by an order of magnitude depending on the workload mix.
3. Reverse-Engineering the Hidden Rates: Single-Variable Isolation
Since the coefficients are not published, the only option is to measure and infer them. The standard approach used by industry analysts is single-variable isolation:
- Measure cache read: first write a fixed-length context, then repeatedly reuse the same prefix;
- Measure fresh input: change the content every time to guarantee a cache miss;
- Measure output: extend the generation length alone while suppressing the share of the other three categories;
- Measure cache write: construct a scenario with frequent new contexts.
Because the UI only shows integer percentages, a single request does not provide enough resolution. You therefore need to run a large number of consecutive requests and record the cumulative tokens consumed each time the quota jumps from 17% to 18%, or from 18% to 19%, then average across several complete intervals to eliminate truncation error. The logic looks like this:
# Pseudocode: infer the unit rate from percentage jump intervalsdef probe_rate(send_request, read_quota):prev, tokens, samples = read_quota(), 0, []while len(samples) < 5:send_request()tokens += TOKENS_PER_REQcur = read_quota()if cur != prev: # percentage changedsamples.append(tokens / (prev - cur))tokens, prev = 0, curreturn sum(samples) / len(samples) # tokens per 1% of quota
Once the four coefficients are measured, weight them by the share of each token category in your real workload to infer how many tokens the plan can theoretically support.
4. The Ideal Workload Assumption: An Inflated Theoretical Value
A typical mix used by some third-party estimation platforms is roughly 97% cache-hit input, 2.5% fresh input, and 0.5% output. That assumes only five thousand of every million tokens processed are output, which describes a continuous coding scenario that is extremely cache-friendly.
This is like the rated range of an electric car: under ideal conditions of continuous driving, no load, low speed limits, and no wind resistance, it really can cover five hundred kilometers, but with everyday stop-and-go driving and frequent cold starts, the real figure may fall below three hundred fifty. The token ledger works the same way.
5. Sources of Loss Under Real Workloads
- Cache expiration: long gaps between sessions invalidate the prefix cache, degrading reads into writes or even fresh input;
- Task switching: parallel work across multiple repositories and languages prevents prefix reuse;
- Context restructuring: requirement changes cause the system prompt and history to be rewritten;
- Higher output share: refactoring, long-form generation, and test code production push the output ratio up significantly;
- Concurrency and rate limiting: retries and failed requests consume quota as well.
The theoretical value therefore has to be multiplied by a loss factor, and the more fragmented the workload, the more severe the loss.
6. A Reusable Cost Accounting Method
Teams are advised to build a small in-house benchmark: fix a set of representative tasks, record changes in the quota percentage along with the measured share of the four token categories, derive your own loss factor, and then normalize cost on a weekly basis.
effective cost = subscription price / (theoretical tokens × loss factor)loss factor = measured weighted rate / ideal-mix weighted rate
7. Conclusion
Whether pricing is based on tokens or on tasks, subscription plans carry obvious hidden costs, and cross-vendor “unit price comparisons” are not methodologically sound. The reliable approach is to understand the independent rate structure of the four token categories, obtain baseline data with single-variable isolation, and then apply a loss correction based on your own workload profile. General capabilities offered by cloud providers such as Baidu AI Cloud for cost governance, including monitoring and alerting, log services, and usage metering, can help teams put this framework into daily operations so that cost becomes observable, attributable, and optimizable.
