Skip to content

fix(dashboard): recognize Codex Pro Standard, Extra and Max tiers - #15163

Closed
xiaoyaner0201 wants to merge 3 commits into
diegosouzapw:release/v3.8.52from
xiaoyaner0201:fix/codex-pro-plan-tiers-20260930
Closed

xiaoyaner0201 wants to merge 3 commits into
diegosouzapw:release/v3.8.52from
xiaoyaner0201:fix/codex-pro-plan-tiers-20260930

Conversation

@xiaoyaner0201

@xiaoyaner0201 xiaoyaner0201 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #15161.

Recognize Codex's prolite, pro, and promax plan identifiers consistently in provider connection rows and Provider Limits. Display them as Pro Standard, Pro Extra, and Pro Max, following OpenAI's merged naming update, while keeping all three in the existing Pro tier category.

Changes

  • Share an exact, display-only mapping for the three Codex identifiers.
  • Pass provider identity through quota cards and page tier statistics/filtering, keeping other providers' generic Pro names unchanged.
  • Read both OAuth workspacePlanType and imported chatgptPlanType in provider rows; an unknown placeholder does not hide a usable imported value.
  • Preserve live-usage-first resolution, raw plan values, unknown fallbacks, and business/workspace classification.
  • Add regression coverage for both metadata shapes, all three tiers, provider isolation, live data overriding stale metadata, and call-site wiring.

No OAuth refresh, provider transport, routing, model entitlement, or quota-enforcement changes. No subscription prices or allowance multipliers are hard-coded. The three branded plan names are retained in their official spelling across locales; no general UI translation keys are added.

Verification

  • Regression demonstrated before implementation: 12 assertion failures / 7 passes; no import failures.
  • Focused related regression suite: 74 passed, including the follow-up unknown metadata edge case (separately reproduced as 1 assertion failure before repair).
  • Changed-file ESLint and Prettier: pass.
  • Independent read-only review: pass on f744f302709728d0ef5e2f4153a9e36dbb0c3287 / tree a191cf82fb526df4e7e61eed6eab88174e54719a.
  • Canonical base-relative complexity gate: zero new cyclomatic or cognitive findings; numbered changelog integrity: pass.

Isolated UI smoke

The real provider page was exercised on the final head with a fresh temporary DATA_DIR and synthetic invalid JWT fixtures only:

  • /dashboard/providers/codex returned HTTP 200.
  • Provider DOM: 7/7 cases passed for workspace-only and imported metadata (prolite, pro, promax), including workspacePlanType=unknown with imported promax → Pro Max.
  • The actual page call chain was exercised through ConnectionRow and its rendered plan badge.
  • Evidence screenshots: providers-en-workspace-import.png and providers-en-unknown-fallback.png (local paths available in the contributor evidence bundle).

The quota page returned HTTP 200 during SSR, but client hydration was blocked by the repository's Next/Webpack process exhausting the bounded 8 GB V8 heap. Therefore quota card labels, Pro filter membership, live-first conflict handling, Business/Claude isolation, tooltips, and zh-CN/ar screenshots remain unverified. The failed quota screenshot is retained as failure evidence, not presented as acceptance. The isolated server and port were cleaned up. Keep this PR Draft until the quota UI can be verified.

Full repository tests and release build are not yet verified. Existing strict mutation-test coverage findings were compared against the exact base and have no candidate delta.

Base: release/v3.8.52 at a1a2dce1a64a4b123f80ec899fc88bb2aa34d1a4.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thank you for this fix, @xiaoyaner0201! Both this PR and #15197 address #15161 (Codex prolite / pro / promax → Pro Standard / Extra / Max). #15197 has just landed on release/v3.8.52, so this one would duplicate the same mapping and I'm closing it to keep a single implementation. If you spot anything your version handles that the merged one does not (for example the chatgptPlanType path on imported connections), please open a small follow-up against the release branch and I'll prioritise it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(providers): recognize Codex Pro Standard, Extra and Max plan variants

2 participants