Cost figures are estimates; per-model and total rounding may differ
This applies only to providers that store cost in nano-precision (see decision 12) — currently OpenCode and Copilot, not Claude. For those providers, the total returned by the all-providers endpoint is computed by summing nano-precision cost across all matching records and rounding once, at the end. The per-model breakdown that each provider’s own single-provider endpoint sums into its own overall total instead rounds cost to whole cents per model row first, and only then sums those already-rounded values.
As a consequence, the per-provider endpoint and the all-providers endpoint
can report different cost figures for the same date range, differing by up
to roughly half a cent per model. The test suite encodes this for OpenCode:
the all-providers total and the single-provider total for the same
underlying data are expected to differ by a cent, with a // rounding
comment marking the divergence as intentional. Claude cannot diverge this
way: its per-record cost is already a whole cent at ingest, so there is no
nano intermediate to round twice — summing the same whole-cent values in any
grouping always produces the same total.
This is accepted, not an oversight to fix:
- The figures are order-of-magnitude estimates for internal reporting, consistent with the CO2 estimate caveat already noted in README.md. Cent-level precision across endpoints is not a goal.
- Unifying the two rounding paths would require summing in nano-precision everywhere and rounding once at the very end, including for per-model figures. If the rounding is ever unified, this entry should be updated or removed.