Skip to content

Share token pricing and word the desktop's chat search and cost - #8

Merged
Quorafind merged 3 commits into
mainfrom
feat/app-chat-search-cost
Oct 18, 2026
Merged

Quorafind merged 3 commits into
mainfrom
feat/app-chat-search-cost

Conversation

@Quorafind

Copy link
Copy Markdown
Collaborator

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-shape
    reconciliation /cost used.
  • rebon_config::ModelTokenPricing::usd_for — the USD price of a usage
    record or a running total.
  • rebon_types::Usage::accumulate — the saturating sum the ledger used.

/cost, plan credits and the ledger call them now; behaviour is
unchanged (the existing /cost tests pass as before). New tests cover
each shape, saturation, and that a running total costs what its records
cost.

Strings. Seven app. keys for the search's sections and indexing
notice 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.

Bon 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.
@Quorafind
Quorafind merged commit 6ca788d into main Oct 18, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant