You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dashboard switch for plan-line context window (272k default / 372k / 1M) — root model_context_window is stripped and hints cannot lift live roster values #4950
ChatGPT-plan (native subscription) models cap at the 272k product window by default, while the underlying GPT-5.6-family models support 1.05M (OpenAI documents >272k inputs as consuming 2x input / 1.5x output rate). The official escape hatch is a root-level model_context_window = 1000000 in Codex's config.toml — but OpenCodex owns that domain: stripRootContextWindowOverrides removes the root key on every injection (for good reason — it is a global override that would misreport every model's window), and provider-level modelContextWindows hints cannot lift the plan rows because live roster values outrank hints.
So today there is no supported way to opt a machine (or a single model) into the 1M plan-line window while OpenCodex manages the Codex home. I need exactly that: a per-machine (ideally per-model) switch to raise the advertised/compaction window for native plan models, without hand-editing artifacts that the next ocx sync rewrites.
Proposed solution
A Dashboard settings switch (alongside the existing Desktop switches, e.g. next to codexClientCompaction) such as "Plan-line context window" with a small set of tiers — default (roster) / 372k / 1m — that OpenCodex applies itself, in whatever layer it owns:
materialize the chosen window (and a matching auto_compact_token_limit) into the per-model catalog / models_cache.json rows for native OpenAI-family models, and/or
write a scoped (per-model rather than global) root override it can recognize and re-apply on every injection instead of stripping it.
The UI should surface the billing caveat (inputs beyond 272k consume 2x/1.5x) next to the tier selector. GET/PUT /api/settings would gain the field, and describeCodexDesktopSwitches-style reporting would show the effective tier.
Alternatives you have considered
Hand-editing root model_context_window in config.toml: works for one session, then the next injection strips it (by design).
Provider modelContextWindows hints: cannot override live roster values (empirically live > hint > seed > fallback), so they never lift the 272k plan rows.
Post-sync patching of models_cache.json rows on every ocx sync: works as an external maintenance script but is exactly the kind of out-of-band artifact edit OpenCodex usually absorbs better than its users.
Additional context
Empirical precedence observed on 2.58.0 while auditing windows: live discovery > modelContextWindows hint > seed catalog > 128k fallback (noted on #4944). The same precedence is what makes the hint route unusable here. Happy to provide roster/catalog captures if useful.
I searched existing issues and documentation.
I removed secrets, tokens, account details, request credentials, and personal data.
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
This issue does not use a recognized issue template.
Please edit the issue to add:
Open a new issue with the Bug report, Feature request, Documentation, or Provider compatibility template.
Or edit this issue so the body uses the template section headings for the kind of report you are filing.
Activity
github-actions commentedon Sep 17, 2026
Issue closed: use an issue template
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
Please edit the issue to add:
See the Contributing guide for details.
Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.