Documentation
¶
Overview ¶
Package modelinfotest holds REFERENCE formulas for tests. No production code may import it.
The accountant prices every bill (accountant.RequestCost). A test that pins the accountant to the formula that priced the same request before imports the reference from here, so the old formula has one test-only home and no production caller.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StoredBill ¶
func StoredBill(p modelinfo.Price, fresh, cacheRead, cacheWrite, output, cacheWrite1h int64) float64
StoredBill is the OLD stored bill of one request: modelinfo.Price.Cost (each product rounded on its own, so no CPU fuses a multiply and an add, #1128) plus the one-hour write premium on the tokens billed at the 1-hour tier. Every write token is priced at the 5-minute rate, and the premium (1-hour rate minus 5-minute rate, never below 0) is added after. p holds the rates at the request's prompt size (Price.At).
accountant.RequestCost must give the same bits. This function exists to test that. Do not call it from production code.
Types ¶
This section is empty.