Show daily and per-model Codex API cost estimates - #11121
Draft
Milofax wants to merge 2 commits into
Draft
Conversation
Author
|
reviewed-head: 775700f |
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.
Codex usage currently exposes token totals without a reliable matching daily cost breakdown. This adds a versioned native daily usage record and pairs tokens with USD API-equivalent estimates in the daily and model views, followed by today/7-day/30-day summaries. The model view covers 30 local calendar days; totals include models outside the four visible rows.
Rates use a dated bundled fallback and the existing manually editable
~/.config/omarchy/agents/pricing.jsonoverride file. Changes reload without restarting the shell. Unknown tariffs and missing token categories remain explicit; headings identify known costs, and a single visible note explains excluded usage and missing model prices. Detailed token coverage remains available on hover. These figures compare API usage costs and are not subscription invoices. There is no pricing scraper or paid-model call.The collector also fixes a native-event case where
last_token_usagechanges while fully measured cumulative counters stay identical: those events no longer invalidate previously known categories. Cache revisioning rebuilds affected cached records, while genuine counter corrections and resets retain conservative handling.Related prior proposal: #10845. This contribution focuses on native Codex usage. Cross-device pricing and additional Claude/legacy-source accounting remain outside this change. Personal plugin adaptations used for local testing are not included in the upstream diff.
Validation at
775700f7b0af5836825a2e448c3c1785666464a8:Base: current upstream
quattro(no prerequisite PR). Local tracker records correspond to native Codex portions of tasks 01/02; this PR does not close unrelated GitHub issue numbers.