Track multi-provider spend and model usage - #2759
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 14, 2026, 5:38 AM ET / 09:38 UTC. ClawSweeper reviewWhat this changesThis PR adds 7-, 30-, and 365-day multi-provider spend reporting across the settings dashboard, menu overview, and local share card with coverage-aware totals. Merge readiness⛔ Blocked until stronger real behavior proof is added - 7 items remain Keep open for maintainer product direction and stronger runtime proof. The branch changes an established six-provider fallback into an all-provider default for profiles without a saved selection, which requires explicit approval or an upgrade-preserving migration. Priority: P2 Review scores
Verification
How this fits togetherCodexBar gathers local usage and cost snapshots from configured providers, aggregates compatible sources into Usage & Spend, then presents the result in Settings, the menu-bar overview, and a local share card. Provider-selection settings determine which overview rows appear, while cost-history availability controls which sources can contribute to totals. flowchart LR
A[Configured providers] --> B[Usage and cost snapshots]
B --> C[Spend aggregation]
C --> D[Coverage and currency checks]
D --> E[Settings dashboard]
D --> F[Menu overview]
D --> G[Local share card]
Decision needed
Why: Current code and tests make absence of a selection a meaningful six-provider behavior, while the PR intentionally changes that behavior for existing users; VISION.md requires maintainer sign-off for this user-facing feature and behavior change. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the six-provider fallback for existing no-selection profiles through a narrow migration while allowing the all-provider default for new installs, unless the product owner explicitly approves changing existing menus. Do we have a high-confidence way to reproduce the issue? Yes—source and the current focused test establish the existing seven-active-provider path resolves to six rows, while the PR patch changes that expected result to all active providers. Is this the best way to solve the issue? No until direction is confirmed: preserving the established fallback for existing profiles via a narrow migration is safer than silently expanding their menus. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f5abbc7df07. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (59 earlier review cycles; latest 8 shown)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b03a03bd1a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks for the sharp review. Two clarifications on the product and architecture decisions:
I also fixed the two concrete hosted-Xcode regressions exposed by the previous run at |
|
@Yuxin-Qiao this is ready for final review/merge when you have a moment. Exact head |
|
@Yuxin-Qiao @steipete when you have a moment, could you take a maintainer look at this base PR? Exact head |
|
Current-main integration is complete at exact head
@Yuxin-Qiao @steipete — this is ready for maintainer review. No merge action was taken. |
|
Thanks for the detailed updates and for looping me in. Just to clarify, I’m not a maintainer of CodexBar and don’t have authority to approve or merge these PRs, so I may not be the right person to make the product-scope decision. I’ll leave that to the repository maintainers. Apologies for any confusion, and thank you for the thorough work. |
What this changes
CodexBar Usage & Spend now works as a true multi-provider overview instead of stopping at Claude and Codex.
Unknown spend is never turned into
$0. Estimates use~, currencies remain separate, and incomplete coverage stays explicit.Screenshots
All values shown here are synthetic.
Combined Overview
Share card
Wide settings · Narrow settings · Proof notes
OpenRouter scope
OpenRouter stays inside the existing plugin boundary on JavaScriptCore and QuickJS. An ordinary API key continues to report credits and key quota.
Management
/activityenrichment is deliberately deferred to a separate follow-up. Removing it restores the existing single optional-request timeout budget and avoids adding a provider-specific history payload or a broader async QuickJS host contract to this PR.Final integration fixes
mainatbff43f8a2cc736a9dd248f6fb275f594b3a472c7.Verification
Exact head:
6e7b6178a3cc2ed86e1e9490b7e551b1eed997a8git diff --checkpassed for the follow-up fixes.This is the current-main successor to #2469 and includes the provider-runtime convergence from #2758. OpenRouter
/activityis preserved separately for a clean follow-up after this lands.Stacked follow-up
#2855 adds the next focused layer: a provider-colored known-token allocation strip and approximate same-row cost per 1M tokens in the Overview summary card.
ff3374eandeb12b5e.