Skip to main content

ADR-0107: FinOps token rule and three amounts

Context​

Providers count cached and reasoning tokens differently.

Decision​

input_tokens includes cached tokens, output_tokens includes reasoning tokens. Each usage event carries three amounts: estimated, measured, billed (statuses estimated, measured, reconciled).

Consequences​

The quota is reserved before the call then committed at the measured amount (429 quota_exceeded).

Evidence​

  • services/control-plane/src/eai/domains/finops/emit.py
  • sql/postgres/V031__finops_usage.sql
  • services/control-plane/src/eai/domains/finops/reservation.py
  • services/control-plane/tests/test_finops_usage.py