fix(provider): cap Codex gpt-5.5 context window at 400K#162
Open
justrach wants to merge 1 commit into
Open
Conversation
gpt-5.5 on the Codex provider was configured with a 1,000,000-token context window, but Codex enforces a 400K cap (openai/codex#19464) even though the raw API supports 1M. The compaction threshold is derived from the model's context window (0.9 x window), so the trigger sat at ~900K and never fired before the provider hard-rejected with context_length_exceeded. Set the Codex gpt-5.5 context_length to 400000 -- matching the other Codex models (all <= 272K except gpt-5.4-mini at 400K). The compaction threshold is now 0.9 x 400000 = 360K, so context compacts before the real ceiling. The direct-API gpt-5.5 entries (1.05M) are left unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Action required: PR inactive for 5 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
gpt-5.5 on the Codex provider was configured with a 1,000,000-token context window, but Codex caps it at 400K (openai/codex#19464) — the raw API supports 1M, the Codex subscription does not.
Because the compaction threshold is
0.9 x context_window(forge_domain/src/agent.rs:316), the trigger sat at ~900K and never fired before the provider hard-rejected the turn withcontext_length_exceeded.Fix
crates/forge_repo/src/provider/provider.json— Codexgpt-5.5context_length: 1000000 -> 400000, matching the other Codex models (all <= 272K exceptgpt-5.4-miniat 400K). New compaction threshold:0.9 x 400000 = 360K, so context compacts before the 400K ceiling.The direct-API
gpt-5.5-2026-04-23/-proentries (1.05M) are left untouched — the raw API genuinely supports 1M.Verification
JSON validated;
cargo check -p forge_repoclean. (Embedded data file — takes effect after a rebuild.)🤖 Generated with Claude Code