4.3 Usage and model pricing
Usage
An agent on its own subscription relays nothing through Gateway, and a request that goes straight to the vendor leaves no record here — but the agent writes a transcript of it on disk anyway.
Usage reads those transcripts. So the spend of every agent on this machine is on one page from the first start, with no provider configured and nothing routed.
Two tabs:
| Tab | Covers | Knows |
|---|---|---|
| Agent spend | Every agent on this machine, routed or not | Tokens, cache hit rate and cost, over time and by model and by agent |
| Relayed spend | Only the traffic that came through Gateway | The above, plus which provider answered and whether it failed |
The first is the complete account of what this machine costs you. The second is the only one that can tell you which upstream the money went to.
Model pricing
Every figure on the Usage page is worked out from Model pricing, a table of what a million tokens costs.
Vendors change their prices and resellers do not follow, so:
- Edit a price by hand — that model is then yours, and nothing overwrites it.
- Or let Gateway reprice the models this machine has run, from the models.dev catalogue, on a schedule. A price you edited yourself is left alone.
| Setting | Effect |
|---|---|
modelsDevSyncMode | Whether the catalogue is synced at all |
modelsDevSyncIntervalHours | How often |
llmPricingFile | A JSON file of your own rates, used instead |
A model with no price is counted in tokens and left out of the cost — the Authenticity report says how much of what a provider served is in that state (3.4).
4.2 LLM Records
Every request an agent relayed through Gateway: the full system prompt, every message and tool call, the schema of every tool the model was offered, plus tokens and cost.
5.1 Settings and configuration
Editing the file after that first start does nothing — except for the keys read before the database is open:

