-
[NA] [BE][FE] Make AI Spend cost computation model-aware
发布于
2026-06-12 14:28:23 +00:00 AI Spend priced an entire window at a single representative model
(models[0] / anyLast(model)), so workspaces mixing models (e.g. Opus +
Haiku) could be costed several-fold wrong. Group every tier-bearing
figure by cc.billing.model and price each model at its own rate.- BE: composition, summary, users and breakdown queries now GROUP BY
model; responses carry a per-model ModelTiers[] (by_model) instead of
flat tiers + a single model; new SpendSummaryResponse ships per-model
current/previous spend; breakdown folds the tail into other per
model; users derive the model from cc.billing instead of spans. - FE: tiersCost() prices each model and sums; dominantModel() drives the
leaderboard chip (+N when a user spans several models).
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
下载附件
- BE: composition, summary, users and breakdown queries now GROUP BY