Repository navigation
Merged
Conversation
… per session and chain
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.
flow viewshowed what each session did but not what it cost. The cost module from #33 existed but nothing displayed it.Each session page now shows the session's cost and each chain's. A cost is "estimated" with the price table's version and SHA-256. It is "unknown" with the reason when there is no table, a price is missing or usage is missing, never zero. The table comes from
flow view --prices FILE, else$FLOW_HOME/prices.jsonif it exists. A bad table, or a missing--pricesfile, stopsflow viewwith a message, and the home's privacy check runs before the table is opened.A response with an error status is not billed. A chain counts its rounds' answers and their earlier attempts. The session counts every answer in the file, side requests included.
Proof: 4 new tests in
tests/viewer/test_view.pycheck a synthetic table against hand-computed totals (0.75 and 1.12 USD), unknown without a table and with a missing price, a refused bad table, and an answer without a model name. Python suite 512 passed.Reviewed with sol-loop: 3 rounds with gpt-6.2-sol. Sol verdict: approved
Sol's fixes: a non-string model name is unknown, only an omitted
--pricesfalls back to the default, and the privacy check comes first.