Skip to content

fix(core): isolate Codex OAuth input-limit metadata - #5297

Draft
hbw00111 wants to merge 1 commit into
apache:mainfrom
hbw00111:fix/codex-oauth-model-limits
Draft

hbw00111 wants to merge 1 commit into
apache:mainfrom
hbw00111:fix/codex-oauth-model-limits

Conversation

@hbw00111

Copy link
Copy Markdown
Contributor

Summary

Codex OAuth turns failed before sending a request because public OpenAI API metadata supplied a 922,000-token input limit alongside a smaller OAuth window (272,000 or 372,000). Exclude that API input limit from Codex OAuth metadata, including refreshed catalogs and shipped fallbacks, so pinned and discovered windows remain usable. Public API metadata and explicit inventory/user input limits retain their existing behavior and conflict validation.

Fixes #5285

Verification

  • Full production build, workspace typechecks, lint, format, Desktop/UI Knip, ASF headers and renderer architecture checks passed.
  • Core suite: 843 passed. Related Runtime context-budget, model-discovery and subscription-fetch suites: 48 passed.
  • Before the fix, the new pinned-window and discovered-window regressions failed with the reported error; both pass after rebuilding the fix.
  • Compiled Runtime probe now resolves gpt-5.5, gpt-5.4 and discovered terra/luna to 272,000, and sol to 372,000, without throwing.
  • Not exercised: authenticated ChatGPT OAuth turns, Windows packaged Desktop, or the full repository test matrix.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex and native Codex subagents reproduced the issue, implemented and reviewed the fix, added regression tests, and ran local validation on behalf of hbw00111. This automated draft is awaiting independent human review and a human decision to advance it; AI review does not replace that review.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Avoid inheriting public OpenAI API input limits for OAuth model metadata, including refreshed and fallback entries. Preserve explicit limit validation.

Generated-by: OpenAI Codex
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(runtime): OpenAI OAuth (Codex) connection fails every turn — resolved input limit (922k) exceeds the pinned context window (272k)

1 participant