fix(server): omit native quota for custom Codex providers #10877
main fromrefs/pull/10877/head·opened View on GitHubWhat changed#
A custom Codex provider can expose rate-limit data that does not describe the account serving requests through its proxy. T3 currently presents that data as native subscription quota.
Mark native usage limits unsupported when requiresOpenaiAuth is false, using the existing API-key exclusion path. Configured hub usage remains available. In Codex, this flag describes the selected provider's authentication requirements, as shown in its account-state implementation.
UI#
Synthetic browser fixtures generated from baseline and patched provider checks. Before, an unrelated 10% native row appears beside the hub's 80% quota. After, only the hub quota remains.
| Before | After |
|---|---|
![]() | ![]() |
Verification#
- 51 provider-registry tests passed, including null and ChatGPT account snapshots with
requiresOpenaiAuth: false; both report unsupported usage with no windows. - Server package typecheck and changed-file lint passed.
- The server report applies to all clients and connection modes. Other providers are unchanged. Browser evidence uses synthetic fixtures; no live proxy/OAuth or mobile end-to-end test was run.
- Fable approved the one-line condition change and regression coverage.
Implemented with GPT-6 in Codex; reviewed with claude-fable-5-1 through Claude Code.
Summary by CodeRabbit#
- Bug Fixes
- Improved Codex provider status detection for accounts that do not use OpenAI authentication.
- Proxy-based rate-limit information is no longer incorrectly interpreted as native subscription usage limits.
- Unsupported usage-limit scenarios now report a clear unsupported status instead of displaying misleading rate-limit data.
Closes #11873
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Approvability#
Verdict: Approved at
516b261Macroscope's review found this PR approvable — This is a small, self-contained server bug fix that prevents proxy-provided rate limits from being displayed as native Codex subscription quota. Existing native-provider behavior is preserved, and regression tests cover the custom-provider cases.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
6361ce3b-35e7-40ae-a110-656bf4e96bf9📥 Commits
Reviewing files that changed from the base of the PR and between 08463e2c401ce87858aaaebcb70ed86fb002fb5f and 516b2618f6eebf7605de58ef6ca039c23fa354ae.
📒 Files selected for processing (2)
apps/server/src/provider/Layers/CodexProvider.tsapps/server/src/provider/Layers/ProviderRegistry.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough#
The Codex provider now reports unsupported usage limits when OpenAI authentication is not required. Tests cover null and ChatGPT accounts with proxy rate-limit data.
Changes#
Codex usage-limit handling
Layer / File(s) Summary Unsupported usage-limit fallback and validation
apps/server/src/provider/Layers/CodexProvider.ts,apps/server/src/provider/Layers/ProviderRegistry.test.tsThe fallback now checks requiresOpenaiAuth. Tests verify unsupported results and empty usage windows for unauthenticated account states.Priority: ⬇️ Low
Estimated code review effort: 1 (Trivial) | ~5 minutes
Suggested reviewers:
juliusmarminge,t3dotgg,maria-rcksMerge Risk: ⚪ Minimal · up to
516b2Custom Codex providers that do not require OpenAI authentication now omit potentially misleading native subscription quota windows while retaining configured hub usage. The intended behavior is covered by focused server tests, with no concrete merge-blocking risk identified.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
Check name Status Explanation Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly and concisely describes the main change: omitting native quota for custom Codex providers. Description check ✅ Passed The description explains what changed, why it changed, the UI result, and verification details. It includes UI evidence and test results. It does not use the exact “Why” and “UI Changes” headings and … - Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment `@coderabbitai help` to get the list of available commands.Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.
Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.
juliusmarminge closed this
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes