Fixed#
- A batch call was billed at twice its cost, and a usage report's batch rows
were left out of the bill. Both providers sell the Batch API at half the
standard price, with caching on top of the batch rate. Anthropic's response
says so in
usage.service_tier: "batch", and Trazum ignored it;from-anthropic,from-openaiandtrazum connectrefused every batch row because there was no rate to price it at. There is: each catalogue row's batch ratio, which the batch advisory already quotes andprice-drift.mjschecks against both providers' batch tables every week. A batch call or row is now priced at it, long band and US-only multiplier included; Anthropic priority and flex rows, whose rates no page publishes, and batch on a model with no batch API, are still left out and named. A record from any source can saybatch: true.
Added#
trazum billreads a Batch API results file. Anthropic's results and OpenAI's output file each put the model and usage one level down, so a results file read as nothing. Each billed line is now a call at the model's batch rate. Results the provider's own page says are not billed (Anthropicerrored,canceled,expired; an OpenAI line without a 200) are counted and left out. Only the model, the usage and the end reason cross: a test plants a marker in the generated text, thecustom_idand the error message and searches the output for it. The web Bill tab reads the same files.