Model Expense Ranking
Every pricing model in the system is assigned a cost ranking ($, $$, $$$) so that dashboards and reports can surface relative expense at a glance. This helps tenants quickly identify high-cost models in their usage mix.
Cost Score
The cost score for a model is calculated as:
cost_score = MAX(prompt_price, completion_price)
This uses the higher of the two per-1M-token rates as the representative cost. The rationale is that the most expensive dimension (input or output) determines the model's practical cost profile.
Ranking Tiers
Models are bucketed into three tiers based on their cost score relative to the full distribution:
| Tier | Label | Meaning |
|---|---|---|
$ | Budget | Lower third of the cost distribution |
$$ | Standard | Middle third |
$$$ | Premium | Upper third |
Tier boundaries are recomputed whenever the pricing data changes, so they adapt as new models are added or prices shift.
Warn Flag
Models whose cost score is an outlier (significantly above the $$$ threshold) receive a warn flag. This flag triggers a visual indicator in the portal dashboard to draw attention to unusually expensive models that may be driving unexpected spend.
Recomputation
Rankings are not recomputed on every request or on a timer. They are recalculated only when prices change, during the PricingSync Azure Function run. This keeps the compute cost negligible:
- PricingSync pulls updated prices from Helicone
- If any price has changed, it recomputes cost scores for all affected models
- Updated rankings are written to the
pricing_modelstable in SQL - The previous rankings are archived to
pricing_models_historyfor audit
Storage
| Table | Purpose |
|---|---|
pricing_models | Current model with pricing rates, cost score, tier, and warn flag |
pricing_models_history | Historical snapshots of pricing and rankings, timestamped |
The portal reads from pricing_models to display tier badges and warn indicators on usage tables and dashboards.