What token volume cannot tell you
A dashboard can display millions of tokens without explaining which team consumed them, for which product, or whether the work was completed. Volume tells you about consumption. Assessing the spending also requires knowing the outcome.
An AI-assisted coding session may involve rephrasing, corrections and repeated attempts. Two sessions with the same cost can therefore produce very different results. High consumption may be justified by a useful, validated task; it may also reflect unsuccessful attempts.
I suggest three levels of tracking: visibility, attribution and decision-making. They connect the billed amount to an explanation of the work done, before an optimization is selected.
Identify calls and who is responsible for them
Visibility starts with the provider, model, account and key used for each call. The responsible user or service must also be identified. Without this information, a billing line remains difficult to explain, even when its total is correct.
Unit prices and the models called need to be matched to usage. A shared key can complicate this work: it identifies technical access without necessarily identifying who consumed it. Tracking conventions need to account for this.
Distinguishing a human user from an automated service also helps interpret consumption. Their calling patterns may differ, as may the actions worth investigating. An inventory of active providers, models and keys helps check this first level.
Link spending to the product, session and task
Attribution links calls to a product, a work session and a task. It allows you to trace the cost of successive attempts and establish whether the task was completed. A team-level total does not always provide that detail.
This requires consistent task identifiers, naming conventions for products and projects, and instrumentation of agents and services. Establishing these rules early avoids having to reconstruct an incomplete call history.
The FinOps Foundation places attribution and governance before advanced chargeback. Before costs are charged back to teams, those teams need to understand the allocation and check its scope. Disputed attribution makes budget decisions difficult.
Track cost alongside quality and completion time
Cost per validated task relates spending to work that has actually been accepted. It should be read alongside the quality of the result and the time needed to deliver it. A lower cost accompanied by more rework warrants examination; higher spending may be justified if the work is delivered faster and meets the same requirements.
Alert thresholds help identify an expensive session, iterations that fail to complete a task, or unusual service consumption. They should be calibrated to trigger a targeted check rather than a series of unhelpful alarms.
These measures can support adjusting a prompt, switching models for a particular use, continuing the work or stopping a use case whose cost is not justified. The teams producing the result and those tracking the spending need a shared definition of a validated task.
Compare optimizations over the same scope
Once this tracking is in place, you can examine caching, routing, prompts and model size. Caching may avoid processing identical content again; routing helps match the model to the request; a better-adjusted prompt may reduce attempts or unnecessary output. Each hypothesis still needs to be measured on the relevant use case.
The before-and-after comparison must cover the same tasks and validation criteria. If workload or quality requirements change, the spending variation cannot be attributed directly to the optimization.
To check your tracking, take one AI coding session and reconstruct its calls, product, task, cost and outcome. Missing information shows what to instrument first. You can then test an optimization and check its effect over that same scope.
The post behind this insight
Expanded from the LinkedIn post. The links below come from the original post; listing them does not imply independent verification.
LinkedIn ↗