Repository navigation
Fix Codex per-model context and compaction configuration - #53
Merged
Merged
Conversation
Emit explicit catalog context ceilings and compaction budgets, retain selected-model limits when status is unavailable, and preserve user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approved
The review reports no active issues with the Codex context-limit and compaction-setting changes.
No open issues 🎉
What changed in this PR
This PR updates oMLX’s Codex integration to preserve user compaction settings while keeping context limits tied to each served model.
Changes:
- Add per-model context ceilings and explicit auto-compaction thresholds at 90% of the effective context window.
- Preserve selected-model metadata when status data is missing and retain user compaction settings across configuration rewrites.
- Add regression tests and document global settings, per-model limits, and the need to restart Codex after context changes.
| File | Description |
|---|---|
tests/test_integrations.py |
Tests per-model limits, missing-status fallback, and compaction-setting preservation. |
README.md |
Explains compaction settings, catalog limits, and restart requirements. |
omlx/integrations/codex.py |
Adds catalog limits, preserves selected-model metadata, and retains user compaction overrides. |
Review effort: Balanced
scaryrawr
added a commit
that referenced
this pull request
Nov 18, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 18, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 19, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 20, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 21, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 21, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 22, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 22, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 23, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 24, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 25, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 27, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 29, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Nov 30, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 1, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 2, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 3, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 3, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 4, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scaryrawr
added a commit
that referenced
this pull request
Dec 4, 2026
Emit explicit catalog context ceilings and compaction budgets, use selected-model limits when status is unavailable, and respect user compaction settings across configuration rewrites. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Codex configuration rewrites deleted user-set auto-compaction limits, and catalog reconstruction could discard the selected model's known context window when status metadata was missing. Catalog entries also lacked a ceiling to prevent a stale global Codex context override from raising a model's advertised limit.
context_windowandmax_context_window, plus an explicit auto-compaction threshold at Codex's existing 90% default.Validation
Apple M4 Max, 128 GiB RAM; Python 3.12.
UV_PYTHON=python3.12 uv run --python python3.12 pytest tests/test_integrations.py tests/test_context_window.py -q- passed, 309 tests.0.169.0-alpha.11.1, using a loopback mock Responses endpoint and the Flash-Next catalog entry: a fresh process with a stalemodel_context_window=262144override reported 194,560 usable tokens, respecting the catalog's 204,800-token ceiling and Codex's 95% usable-context calculation. No model inference was performed.Checklist