Choose the unit before measuring the cost
Tokens are an input. The useful denominator is an accepted capability outcome under a defined constraint and review standard.
Capability
Define the reusable function, module, service, or system being produced or acquired, including runtime, deployment, rights, interfaces, and acceptance tests.
Accepted outcome
Count completion only when the artifact passes evaluation, integration, review, and operating gates. A generated patch that requires rework is not a successful unit.
Execution horizon
Separate one-time creation and integration from expected executions, updates, provider changes, and reuse across teams or agents.
Build the full cost stack
Run-to-run token variation, tools, retries, and review can dominate the list-price model estimate.
Generation
Track input, cached, and output tokens; model mix; context construction; retries; tools; compute; and orchestration for the complete attempt—not only the final call.
Acceptance
Include tests, evaluation, sandboxing, security review, human review, failure analysis, and the iterations required before the capability is accepted.
Operation and change
Include hosting, monitoring, incidents, maintenance, dependency updates, model migrations, vendor pricing, entitlement, and integration changes over the chosen horizon.
Compare regeneration with acquisition fairly
The acquisition option must satisfy the same capability contract and include the work required to trust and integrate it.
Coverage and rights
A lower-priced primitive is not recommendable when it covers one feature of a complete request or lacks the rights required for deployment, modification, or redistribution.
Integration estimate
Model adaptation, interface work, evaluation, review, CI, deployment, documentation, and the residual operating responsibility that remains after purchase.
Decision range
Use ranges and sensitivity rather than a single savings percentage. Return evaluate-further when plausible assumptions overlap.
Turn repeated decisions into a defensible dataset
The moat is not another generic cost calculator. It is a growing record of capability contracts, observed attempts, integration outcomes, acceptance rates, and assumption changes.
Version every estimate
Preserve method, model and tool versions, constraints, source option, environment, and reviewer disposition so comparisons can be reproduced.
Separate modeled from observed
Keep directional planning estimates distinct from provider billing, agent traces, accepted outcomes, and realized operating cost.
Learn at the capability level
Aggregate where a capability is truly reusable: which constraints recur, what agents rebuild, where integrations fail, and which acquired options survive change.