Skip to contents

ProviderUsage records token and cache counts supplied by a provider. EstimatedUsage records an explicitly named estimator and method. UsageUnavailable records that a provider did not supply counts; it has no fabricated token counts or cost. Usage components are disjoint: input excludes cache reads and writes, while output includes any reported reasoning tokens. reasoning is an optional breakdown of output; it is never added to total a second time. The optional cache_write_1h value is a subset of cache_write.

Details

rho_price_usage() is the open pricing protocol. Its default Model method selects the highest matching long-context tier, prices every component, and returns a new counted usage value with a NominalUsageCost. It does not claim to report a subscription charge. Model subclasses may provide methods for provider-specific pricing rules.

rho_summarize_usage() preserves every typed observation and reports disjoint token totals, nominal cost, and the latest cache-hit proportion. complete is false when any turn has UsageUnavailable; cost_complete is false when a counted turn has no nominal price. Zeroes therefore never hide missing provider data.