Calculating LLM Subscription Quotas: Cost-Based Allocation and Proportional Metering
This article explores how large language model (LLM) subscription services calculate usage quotas by shifting from uniform token pricing to cost-based allocations. It covers the logic behind quota tables, how to manage limited-time promotional quotas, and how proportional metering works when tracking mixed model usage. Finally, it provides an engineering evaluation checklist, common misconceptions, and implementation recommendations for managing LLM costs effectively.
1. Why Quotas Are No Longer Uniformly Priced by Token
Subscription-based large language model (LLM) services typically charge a fixed monthly fee, but underlying API calls are billed by tokens, categorized into input, cached reads, and output. The unit price of different models can vary by tens of times. If a subscription simply provides a uniform token limit, high-cost models will be depleted too quickly, while low-cost models will remain underutilized. To address this, service providers have adopted a different approach: assigning a specific USD-based monthly quota to each model, ensuring the quota reflects that model’s cost structure.
This design leads to two direct consequences. First, the quota figure is not the model vendor’s public list price, but rather a mapping of the service provider’s procurement cost. Second, the available usage of the same subscription varies significantly across different models. To understand a quota table, you must first accept these two premises.
2. Cost-Based Fixed Allocation: The Logic Behind Quota Tables
A quota table is generally determined by three factors:
- Procurement Cost: The unit price the service provider secures from compute suppliers, influenced by purchasing scale and contract terms.
- Hosting Method: Shared compute, dedicated compute, and reserved compute each have different cost curves.
- Business Strategy: Which models the provider wants to use to attract users, and where they are willing to offer discounts.
When a service provider secures a lower procurement price for a specific model, they can pass the savings on as a higher monthly quota. If no discount is negotiated, the quota must be tightened. Therefore, a high quota does not necessarily mean the model is expensive, and a low quota does not mean the model is of poor quality. To determine if a quota table is cost-effective, you need to evaluate the model’s unit price, the quota figure, and your actual usage patterns simultaneously.
Below is a set of hypothetical sample values, used solely to demonstrate the calculation method and not corresponding to any real product:
| Model | Output Price (per million tokens) | Monthly Quota (USD) |
|---|---|---|
| Model A | 2.00 | 300 |
| Model B | 0.50 | 60 |
| Model C | 8.00 | 15 |
Model C has the highest unit price but the lowest quota. This indicates that the quota depends on the service provider’s cost structure, not just the unit price.
3. Limited-Time Increases: Identifying and Verifying Promotional Quotas
Service providers sometimes temporarily increase the quota for a specific model. These promotions have three impacts on engineering practices:
- Quotas often have expiration dates. After expiration, the quota may revert to default levels. Workflows relying on high quotas need to be planned in advance.
- Expiration dates should be written into configuration files, rather than relying on human memory or assuming they are permanently valid by default.
- Secondhand historical values may be inaccurate. When planning capacity, refer to the service provider’s official documentation and record the verification time.
The following code checks whether a limited-time quota is still within its valid period:
from datetime import datedef quota_window_active(expires_on: date, today: date | None = None) -> bool:"""Check if a limited-time quota is still valid. The expiration date is considered valid."""today = today or date.today()return today <= expires_on
When a quota reverts, the system should have a clear degradation path, such as switching to the default quota, triggering an alert, or pausing non-critical tasks. The earlier the degradation logic is designed, the less likely unexpected interruptions will occur when quotas change.
4. Proportional Metering: Tracking Mixed Model Usage
To understand proportional metering, the key is to clarify the meaning of the monthly cap. A common definition is: a specific model’s monthly cap represents the usage the subscription can cover if the user exclusively uses that model for the entire month. Thus, each model’s cap serves as a conversion baseline.
Assuming the monthly cap for model i is Ci, and the cost consumed on that model this month is ci, the proportion of the monthly quota consumed is ci / Ci. Summing these proportions across all models yields the total consumed proportion. The remaining proportion equals 1 minus this sum.
A frequently overlooked consequence of this metering method is that the USD value of the remaining quota depends on which model is used next. Suppose Model A has a cap of $300 and Model B has a cap of $60, and each has consumed 10% of its cap. The total remaining proportion is 80%. If the remainder is entirely used on Model A, it equates to roughly $240 worth of usage; if entirely used on Model B, it equates to only about $48.
The following code implements this calculation:
from dataclasses import dataclass@dataclassclass Usage:model: strcost_usd: float # Cost consumed on this model, converted based on the provider's pricingdef remaining_ratio(usages: list[Usage], caps: dict[str, float]) -> float:"""Calculate the remaining quota ratio, clamped between 0 and 1."""consumed = 0.0for u in usages:consumed += u.cost_usd / caps[u.model]return max(0.0, 1.0 - consumed)def remaining_dollars_on(model: str, usages: list[Usage], caps: dict[str, float]) -> float:"""Convert the remaining ratio into equivalent USD quota for a specific model."""return remaining_ratio(usages, caps) * caps[model]caps = {"Model A": 300.0, "Model B": 60.0, "Model C": 15.0}usages = [Usage("Model A", 30.0), Usage("Model B", 6.0)]print(remaining_ratio(usages, caps)) # 0.8print(remaining_dollars_on("Model A", usages, caps)) # 240.0print(remaining_dollars_on("Model B", usages, caps)) # 48.0
This code demonstrates that switching models deducts a proportion, not cash directly. When doing cost estimation in engineering, you should track usage by proportion and log the model name, token count, and converted cost after each API call.
5. Engineering Evaluation Checklist
When selecting or designing a quota-based billing scheme, evaluate it across the following dimensions:
- Cost Predictability: Proportional metering requires continuous logging of every call; otherwise, remaining quotas cannot be estimated.
- Routing Strategy: The routing layer can select models based on task difficulty, but should factor the post-switch remaining quota into the decision. For example, use models with lower caps for simple tasks, reserving high-cap model headroom for critical tasks.
- Observability: Log the model name, input, cached reads, and output token counts, as well as the cost converted by unit price. Without these fields, it is impossible to trace the source of quota consumption.
- Degradation Path: When quotas are exhausted or expire, there should be fallback models, queuing, or manual approval mechanisms.
- Data Source and Timeliness: Read unit prices and quotas from the service provider’s API or official documentation, and save snapshots with timestamps for traceability.
6. Common Misconceptions
- Treating the quota figure as the model’s price. The quota reflects the service provider’s cost and strategy, not the public list price.
- Assuming high quotas are permanent. Limited-time increases usually have expiration dates; planning should be bound by these dates.
- Assuming model switching deducts cash directly. Under proportional metering, the USD value of the remaining quota fluctuates based on the target model’s cap.
- Using secondhand values for capacity planning. Relayed data may be delayed or distorted; always rely on official documentation.
7. Implementation Recommendations
- Centralize each model’s cap, unit price, and expiration date in a configuration file, noting the source and verification date.
- Log the model and cost at the API call layer, periodically calculate the remaining ratio, and set threshold alerts.
- Design automated degradation logic for limited-time quotas, and test the business impact of degraded performance before the expiration date.
