Repository navigation
Share token pricing and word the desktop's chat search and cost - #8
Merged
Merged
Conversation
added 3 commits
October 18, 2026 17:31
The desktop app is about to show what each conversation cost. The arithmetic that turns token counts into dollars lived as private functions in rebon-session-runtime, which the app does not depend on, and summing usage records was a private helper of the usage ledger. A second copy in the app would eventually disagree with /cost. Move the bill split to rebon_config::BilledTokens::of and the pricing to ModelTokenPricing::usd_for, beside the rates they apply, and the saturating sum to rebon_types::Usage::accumulate. /cost, plan credits and the ledger now call them; their behaviour is unchanged.
The desktop's title bar search now finds chats by what they say, and its composer status line shows what a chat cost. Add the section header and indexing notice for the first, and the cost tooltip lines for the second: estimated or recorded, the subagents' share, unpriced models.
Bring in CLI 1.11.0 and agent messaging before the desktop builds against this branch. No conflicts; the string catalogs regenerate unchanged.
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.
The desktop app is gaining a search over what chats say and a cost per
chat. Both need two things from this repo.
Shared pricing. The arithmetic that turns token counts into dollars
was private to
rebon-session-runtime, which the app does not depend on,and summing usage records was a private helper of the usage ledger.
rebon_config::BilledTokens::of— the OpenAI/Anthropic cache-shapereconciliation
/costused.rebon_config::ModelTokenPricing::usd_for— the USD price of a usagerecord or a running total.
rebon_types::Usage::accumulate— the saturating sum the ledger used./cost, plan credits and the ledger call them now; behaviour isunchanged (the existing
/costtests pass as before). New tests covereach shape, saturation, and that a running total costs what its records
cost.
Strings. Seven
app.keys for the search's sections and indexingnotice and the cost tooltip, in en, zh-CN and ja, with the desktop
catalogs regenerated.
Also merges current
main(CLI 1.11.0) in, with no conflicts.