Skip to content

fix(session): label token and cost totals as local estimates - #12672

Open
F0Rextasy wants to merge 1 commit into
can1357:mainfrom
F0Rextasy:docs/12619-token-cost-scope-clarity
Open

F0Rextasy wants to merge 1 commit into
can1357:mainfrom
F0Rextasy:docs/12619-token-cost-scope-clarity

Conversation

@F0Rextasy

Copy link
Copy Markdown
Contributor

What

I reviewed the full diff; the session info panel presented local token totals and catalog-based cost next to each other with no scope, so both headers now state they are local accounting and estimates rather than provider billing.

Why

Fixes #12619

Testing

  • bun test packages/coding-agent/test/slash-commands/session.test.ts (5 pass)
  • bun --cwd=packages/coding-agent run check:types (pass)
  • oxlint + oxfmt on the changed file (pass)

  • bun check passes
  • Tested locally
  • CHANGELOG updated with the required attribution (if user-facing; internal issue fixes use issue links, external contributions add the PR link and contributor credit after creation)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@roboomp roboomp added fix providers LLM provider-specific issues review:p1 triaged tui Terminal UI rendering and display ux User experience improvements labels Sep 22, 2026

@roboomp roboomp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 — scoped two-line clarification, but the Cost heading currently calls provider-reported premium/credit meters OMP estimates.
Required packages/coding-agent changelog attribution is also missing.
Maintainer question: #12619 is broader than /session; should this partial clarification close it?
Thanks @F0Rextasy.


if (stats.cost > 0 || normalizedPremiumRequests > 0 || stats.credits !== undefined) {
info += `\n${theme.bold("Cost")}\n`;
info += `\n${theme.bold("Cost (OMP estimate, not an invoice)")}\n`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking: This heading also scopes the Premium Requests, Credits, Committed Credits, and Committed ACU rows below it. Those are not OMP estimates: Usage.credits is explicitly provider-reported (packages/catalog/src/types.ts:173), and premiumRequests is the Copilot counter. Calling the whole section an OMP estimate makes provider meters look locally calculated, which reverses the distinction this change is meant to add. Please qualify only stats.cost as estimated, or split the provider-reported meters into their own section.

info += `${theme.fg("dim", "Append-Only:")} ${activeLabel} (setting: ${settingLabel})\n`;
}
info += `${theme.bold("Tokens")}\n`;
info += `${theme.bold("Tokens (local session accounting, not provider billing)")}\n`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should-fix: This changes user-facing TUI copy in packages/coding-agent, but this PR has no packages/coding-agent/CHANGELOG.md entry and its changelog checklist remains unchecked. Repository convention requires an entry under ## [Unreleased]; for this external contribution, include the PR link and @F0Rextasy attribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix providers LLM provider-specific issues review:p1 triaged tui Terminal UI rendering and display ux User experience improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify local token totals versus provider usage

2 participants