You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A call's estimated cost prices tokens written to a cache at the cache-read rate #50
A price row carries cache_write (app/nullius/prices.py, from the list's cache_creation_input_token_cost), which is not used. On Anthropic's prices a cache write costs 1.25 times the input rate and a cache read 0.1 times: tokens written to the cache are counted at a twelfth of their bill. Found by a review of the spending cap, not by a run.
Reproduction
A standard run on a provider whose replies carry cache_creation_input_tokens and no cost of their own, with a model whose price row has cached and cache_write.
Compare a call's cost_usd in its calls.jsonl with the provider's bill for it.
Expected
Tokens written to a cache are priced at cache_write, those read from it at cached.
Acceptance
A reply's cache-write tokens are priced at the row's cache_write rate (the input rate when the row has none), apart from its cache-read tokens.
A test with a reply carrying both kinds shows the estimate.
Dependencies and related
A run's spending cap (#14, #46) settles a call at this estimate when the reply carries no cost of the provider's own, so on such a provider it can let a run spend past its cap. Placeholder priority: the lowest defensible, it changes a number shown, not what runs.
Activity