Skip to content

fix(core): align ChatGPT OAuth context limits - #39541

Closed
magoz wants to merge 1 commit into
anomalyco:devfrom
magoz:oauth-context-limits
Closed

fix(core): align ChatGPT OAuth context limits#39541
magoz wants to merge 1 commit into
anomalyco:devfrom
magoz:oauth-context-limits

Conversation

@magoz

@magoz magoz commented Jul 29, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #38851

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Applies V1's ChatGPT OAuth-specific GPT-5.5/5.6 context limits in V2. Public API-key limits and other models remain unchanged. The catalog reloads when the OpenAI connection changes.

ChatGPT's Codex backend exposes smaller windows than Models.dev's public API catalog. Without this overlay, provider overflow recovery compacts GPT-5.6 Sol near 372k while the TUI reports about 35% of 1.05M.

Catalog inspection reads stored credential type without refreshing tokens, so token expiry or refresh failure cannot alter model metadata.

How did you verify your code works?

  • focused OpenAI plugin tests: 8 pass
  • full Core suite: 1081 pass
  • Core typecheck
  • pre-push monorepo typecheck: 30 packages

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #38987: fix(core): honor Codex input limits
#38987

Why it might be related:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@magoz

magoz commented Jul 29, 2026

Copy link
Copy Markdown
Author

Closing in favor of the existing maintainer-requested V2 fix #38987. That PR targets the actual v2 branch and also fixes input-limit propagation, compaction budgeting, and TUI reporting. Production evidence and one credential-refresh edge were added there.

@magoz magoz closed this Jul 29, 2026
@magoz
magoz deleted the oauth-context-limits branch July 29, 2026 17:19
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.

tui: compaction triggers around 30–35% with gpt-5.6-sol

1 participant