| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Has been cancelled
A backend that bills money declares a catalog entry: currency, rates per token in billionths of a minor unit (plain input, cache reads, cache writes, output) per input-length tier, an optional per-call fee, and the source of the prices. Undeclared is not free. From the request alone the entry gives an upper bound: every declared input token at the highest input rate, every allowed output token at the output rate, in the worst tier a bill of no more than the declared input could land in. A backend that bills within the declared tokens cannot charge more. Under a money ceiling the router admits only a free backend or one whose bound fits, in the ceiling's currency, never converted; among those it still picks the fewest joules. Under a grant that bounds money the steward reserves the bound on every link before the work and settles the bill after it; a request naming no money ceiling under such a grant may spend none and reaches only a free backend. A grant is debited its running total rounded up, so hundredth-of-a-cent calls are not debited a cent each. The journal records the reservation and the bill, and a restart replays both; a serve in flight stays debited its reservation. The receipt carries the bound, the bill, the debit and the price as declared; receipts without money keep their bytes (the published pack still verifies). The OpenAI-compatible binding reads metadata.funds_ceiling and, under one, declares input as the text's byte length, an upper bound, not the chars/4 estimate. JCP: a priced hold now checks money before it admits the call into its windows, so a hold refused for money fills no window (it did, for both the lone and the chained hold). hold_chained_priced_for also checks the caller's joule ceiling in the same step, which is what Mesh needs. Falsified, each turns a test red: admitting before the money check (lone and chained), the declared tier only, rounding each call up, undeclared as free, an unreported cache split at the plain rate, no implied zero ceiling under a money grant, a replay that forgets the running total, and the binding declaring the estimate. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .. | ||
| examples | ||
| src | ||
| tests | ||
| Cargo.toml | ||