fix(models): use 1M context for openai-codex gpt-5.4#37876
Merged
jalehman merged 3 commits intoopenclaw:mainfrom Mar 9, 2026
Merged
fix(models): use 1M context for openai-codex gpt-5.4#37876jalehman merged 3 commits intoopenclaw:mainfrom
jalehman merged 3 commits intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryThis PR fixes a forward-compatibility bug where Changes:
No logic errors or regressions were found. The change is minimal and surgical—two new constants plus a three-property patch object—with all affected code paths covered by updated unit tests. Confidence Score: 5/5
Last reviewed commit: 0d21607 |
20 tasks
0d21607 to
b507ebe
Compare
b507ebe to
9891440
Compare
9891440 to
3f36f59
Compare
a8ea9a5 to
bb77c55
Compare
bb77c55 to
c410207
Compare
Contributor
This was referenced Mar 9, 2026
vincentkoc
pushed a commit
that referenced
this pull request
Mar 9, 2026
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.
Summary
This fixes the
openai-codex/gpt-5.4forward-compat fallback so it no longer inherits the legacy Codex context window fromgpt-5.3-codex/gpt-5.2-codextemplates.Instead, the fallback now explicitly uses GPT-5.4 metadata for:
contextWindow = 1_050_000maxTokens = 128_000This also updates the compat/list test expectations so the local model catalog and forward-compat resolution stay aligned.
Closes #37875.
Testing
pnpm vitest run src/agents/model-compat.test.ts src/agents/pi-embedded-runner/model.test.ts src/commands/models/list.list-command.forward-compat.test.tspnpm build