[providers] 🤖 fix: estimate Codex OAuth costs - #4099
Conversation
Use API-equivalent estimates for new Codex OAuth requests. OAuth authentication does not prove that usage is free. Preserve historical totals and remove automatic zero-cost metadata. --- _Generated with `xum` • Model: `openai:gpt-6-astra` • Thinking: `high` • Cost: `$12.98`_ <!-- mux-attribution: model=openai:gpt-6-astra thinking=high costs=12.98 --> Co-authored-by: Mux <noreply@coder.com>
|
@codex review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d66e12d6c1
ℹ️ 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".
Do not add historical usage migration to this change. --- _Generated with `xum` • Model: `openai:gpt-6-astra` • Thinking: `high` • Cost: `$27.16`_ <!-- mux-attribution: model=openai:gpt-6-astra thinking=high costs=27.16 --> Co-authored-by: Mux <noreply@coder.com>
|
@codex review The user explicitly requests estimates for new usage only. Historical usage migrations are outside the requested scope. |
This comment has been minimized.
This comment has been minimized.
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Show API-equivalent dollar estimates for new Codex OAuth usage instead of forcing costs to $0.
Background
OAuth can consume paid Business workspace credits. Authentication alone does not prove that usage is free.
Implementation
costsIncludedbehavior. Do not add historical migrations or backfills.Risks
The displayed amounts estimate API-equivalent usage, not exact credit charges. They do not change provider billing.
Dollar-based goal budgets now count new OAuth usage. Historical usage and upgraded-workspace aggregate reconciliation are outside this PR.
Repricing old mixed aggregates can change their displayed totals; this PR does not repair them.
Generated with
xum• Model:openai:gpt-6-astra• Thinking:high• Cost:$27.16