Repository navigation
Estimate cost from tokens and rank report findings by waste #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b2057ee
Estimate cost from tokens and rank report findings by waste
tjdonley 50b8d24
Protect provider cost and scope the confidence breakdown
tjdonley 91d7501
Price only real version suffixes and reject negative token counts
tjdonley fb842e5
Restrict prefix pricing to build stamps and leaf-attribute the estimate
tjdonley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user overrides a bundled model such as
gpt-4o-mini,PricingTable.pricesretains both the configured and default entries, and this loop prints both conflicting rates. Lookup actually uses the configured entry, soagentprof pricing listdoes not show the promised effective table and leaves users unable to tell which displayed rate is applied; filter entries shadowed by configured models before rendering.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed — fixed in 50b8d24.
PricingTable.pricesdeliberately keeps configured and default entries together solookupcan resolve by specificity, but that is an internal ordering concern and should not have been what the command rendered.Added
PricingTable.effective_prices(), which drops default entries shadowed by an exact configured model name, and pointedpricing listat it. Shadowing is exact-name only, so configuringgpt-4o-minicorrectly still leaves the bundledgpt-4orow visible — it is a genuinely different model thatlookupcan still return.Two tests added: one asserting a single row with
source = configsurvives for an overridden model whilegpt-4oremains, and a CLI test asserting the shadowed bundled rate no longer appears next to the override.