Repository navigation
fix(standard): count and book a call over a price's prompt size at that size's rates - #504
Open
pierreleca wants to merge 4 commits into
Open
pierreleca wants to merge 4 commits into
pierreleca wants to merge 4 commits into
Conversation
…at size's rates Some models are billed at higher rates once a request's prompt passes a size: Claude Haiku 5.5 at five times its rates over 100,000 prompt tokens, cache reads and writes counted. A price row held one set of rates, and the public list's `_above_<N>k_tokens` costs were dropped when it was read. Such calls were counted and booked at the lower rates, and a spending cap let the bill reach several times the cap. A row may now hold `above`: the rates of a prompt over a number of tokens. The list's own fields fill it; `--price` takes it after a `/` and `nullius prices set` with `--above`. The relay prices a reply by its prompt tokens, and the cap books a call at the rates of its estimated prompt. A row without `above` prices as before.
… size given twice A size may leave out any rate, the input rate too: a rate left out stays as it is below that size. A user's row whose size gave no input rate did not load. The public list's sizes were found from its input fields alone, and a size the list gives only an output or a cache rate for was lost. Two entries of the same size passed the row's check and loaded. The `--price` written from that row for a host was then refused there. Such a row is now kept in its file and reported, as other rows that cannot price are. The tests now also check a capped call's booking past a size, its output included, and a rate left out between two sizes.
… row with a size of none A user's row with `"above": null` was taken as a row with no sizes and priced with no word. A row that names `above` must give a list: such a row is now kept in its file and reported, as other rows that cannot price are. A list field past a size of 0 tokens made its whole model unusable, and the model lost its price. That size is now left out and the row kept. The test of a user's file now covers each part of a size's check: a size with a cache rate alone loads, and a rate that is no number, a size of 0, below 0 or a boolean, and `above` as null or an object are each kept, reported and not priced.
…saves it The Settings form holds one set of rates. Saving a model's price there wrote a new row and dropped, with no word, the rates past a prompt size that `nullius prices set --above` or the prices file had given it. Those rates now stay when the form saves the model's other rates; the form gains no field. A row without them is saved as before.
pierreleca
marked this pull request as ready for review
November 30, 2026 09:33
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #503
What
above: rates past a prompt size.*_above_<N>k_tokenscosts fill it.--price m=0.1,0.5/100000=0.5,2.5andnullius prices set --abovetake it.aboveprices as before.aboveon a save.Verified
main: costs at 100,000 and 100,001 tokens, a capped call refused unsent, the list,--price,set --above, Settings.Risk
above, and a keptabovemay be stale.Agents