Repository navigation
feat: show Codex usage in provider usage center - #13519
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files, incremental)
Commit The retain/prune branches match the removed Previous Review Summaries (6 snapshots, latest commit 51430de)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 51430de)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files, incremental)
The incremental commit ( The Previous review (commit 791a4bc)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files, incremental)
The incremental change waits for Previous review (commit 8326939)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Previous review (commit df7c24f)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Previous review (commit ed1dce4)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Previous review (commit e87bb5b)Status: No Issues Found | Recommendation: Merge Files Reviewed (27 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
e87bb5b to
ed1dce4
Compare
df7c24f to
8326939
Compare
| return windows(JSON.stringify(["additional", item.id, count]), item.name, item.rate, now) | ||
| }) | ||
| const plan = plans[native.plan?.toLowerCase() ?? ""] | ||
| return { |
There was a problem hiding this comment.
Are those values from the API? What if this changes?
There was a problem hiding this comment.
These are values defined by the shared usage API. The idea/goal was to convert provider-specific details into the shared format. So if ChatGPT changes its response, we update the adapter only while the rest of the codebase remains the same.
| prolite: "ChatGPT Pro Lite", | ||
| business: "ChatGPT Enterprise", | ||
| self_serve_business_prolite: "ChatGPT Business Premium", | ||
| self_serve_business_usage_based: "ChatGPT Business", |
There was a problem hiding this comment.
Similar to the other comment: I wonder if we could pull everything API specific into one common place that can be updated there if the API changes. Currently it feels like we have different technical API values mapped in different parts of the code?
There was a problem hiding this comment.
We could, however this keeps the usage constants separate and out of the upstream file which does not have this support. The concept/strategy I've been pursuing however has been to have a set of shared concepts and statuses in the generic usage handler. Each provider is then mapped to that shared API contract to keep things easy from a UI/UX standpoint.
In this case normalize() converts them into the shared contract. Neither the clients nor the shared usage service duplicate the plan mapping.
There was a problem hiding this comment.
This question was less related to duplication and more to the cohesion.
The argument for one generalization: We only have to update one place in the future
The argument for different places: The keys are to technically bound to the function of their component
Either way, I am going to approve. Just wanted to clarify.

Summary
Show ChatGPT Codex quota alongside other providers in the CLI and VS Code Provider Usage Center, using the active OpenAI OAuth connection and existing Core transport/cache machinery.
Supersedes closed draft #11612, rebuilt on the architecture merged in #11611 rather than carrying forward the obsolete CLI-owned implementation.
Scope