Technical reference / Data & methods
Usage & pricing methods
How recorded usage becomes an estimate, including cache rates, tiers and provider-specific rules.
Price entries are keyed by provider/model. The loader checks prices.json beside an explicitly supplied base file, then config/prices.json in the working directory, then the working directory itself. It loads the first matching file and overlays configuration.prices. Keys beginning with _ are metadata and are removed from the runtime table.
If a model has no exact key, the code strips one supported trailing snapshot-date suffix (-YYYYMMDD, -YYYY-MM-DD or four digits) and tries again. Missing entries produce unknown cost; the software does not query provider price APIs.
{
"provider/example-model": {
"input": 1.0,
"output": 4.0,
"cached_input": 0.1,
"cache_write": 1.25,
"tiers": [{"above": 200000, "input": 2.0, "output": 6.0}]
}
}
The values above are illustrative rates, not a quotation for a real model.
| Field | Meaning |
|---|---|
inputReviewed R 0.1.16 |
USD per million ordinary input tokens. |
outputReviewed R 0.1.16 |
USD per million output tokens, including reasoning. |
cached_inputReviewed R 0.1.16 |
Optional cache-read rate. Without it, use the adapter's fallback factor, or ordinary input price. |
cache_writeReviewed R 0.1.16 |
Optional cache-creation rate. Without it, use the adapter's factor, or ordinary input price. |
tiersReviewed R 0.1.16 |
Entries with above thresholds. Use the highest threshold strictly below the call's input-token count and overlay its rates. Equality does not activate that tier. |
off_peakReviewed R 0.1.16 |
Optional off-peak rate overrides applied by the DeepSeek adapter. |
Let I = input tokens, C = cache-read tokens clipped to I, and W = cache-write tokens clipped to the remaining I−C. Let O = output tokens. Then:
cost = ((I − C − W) × input_rate
+ C × cache_read_rate
+ W × cache_write_rate
+ O × output_rate) / 1,000,000
Reasoning tokens are not added again. For I=1,000, C=200, W=0, O=500 at the illustrative rates above, cost is (800×1 + 200×0.1 + 500×4)/1,000,000 = $0.00282.
| Rule | Checked-in implementation |
|---|---|
| OpenAI cache fallbackReviewed R 0.1.16 | Cache reads 0.1× ordinary input. |
| Anthropic cache fallbackReviewed R 0.1.16 | Reads 0.1× input; writes 1.25× input. |
| xAI / Google / AlibabaReviewed R 0.1.16 | No general discounted fallback factor; explicit model rates are needed for a discount in this calculation. |
| DeepSeek peak windowReviewed R 0.1.16 | Monday–Friday, 01:00–04:00 and 06:00–10:00 UTC, based on recorded call start. End hours are exclusive. |
| DeepSeek off-peakReviewed R 0.1.16 | Explicit off_peak rates if present; otherwise numeric rates are halved. Missing start time uses the regular/tier rate. |
| Unknown provider in a historical traceReviewed R 0.1.16 | Generic pricing rules can still apply if a matching price entry exists. This does not add execution support for that provider. |
These are versioned software assumptions. They can differ from a provider's current billing policy or an account's negotiated rate. The report computes estimates from saved usage and a local price list; it does not reconcile invoices.
The model breakdown groups by provider/model, while the efficiency charts group proposal calls by agent slot. Collaboration is proposals plus votes. Analysis is the assessment selected for the page. A total becomes unknown when an included priced call cannot be costed; old missing-usage records have additional gaps.
Failed attempts are not comprehensively persisted as separately billable calls. To reproduce an estimate, retain the raw usage, timestamps, adapter/source version and price table. Re-rendering the same trace with revised prices can alter its totals without changing the collaboration.
Source files used for this reference
Reviewed at 7361ea0b71a5.