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
[FEATURE]: Expose opt-in 1M context variants for GPT-5.6 OAuth #46527
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The Codex OAuth backend now supports a 1,000,000-token context window for GPT-5.6 models. However, OpenCode still applies the previous 400,000 context / 272,000 input / 128,000 output limits to these models when OpenAI OAuth is used, preventing users from using the longer context window through OpenCode.
This is different from the public OpenAI API, which exposes a 1,050,000-token context window. The Codex OAuth backend supports 1,000,000 tokens instead, leaving a maximum input budget of 872,000 tokens when 128,000 tokens are reserved for output.
I have verified the 1,000,000 context / 872,000 input / 128,000 output limits through actual testing in Codex.
I propose keeping the existing GPT-5.6 OAuth models and limits unchanged as the default while adding explicit, selectable -1m variants.
Proposed behavior:
Keep the existing GPT-5.6 OAuth models at 400K context / 272K input / 128K output.
Add opt-in -1m variants for GPT-5.6 Sol, Terra, Luna, and their Fast variants.
Configure the new variants with 1M context / 872K input / 128K output.
Resolve the default and -1m variants to the same underlying OpenAI model ID.
Preserve the existing model options and reasoning variants.
Do not affect GPT-5.5 or API-key authentication.
Allow users to switch back to the existing default models at any time.
I already have a focused local implementation with tests covering the default models, the new -1m variants, their limits, and their underlying API model IDs.
Reacted by Giovanni Nicosia (mood) and Sergei Garcia
This issue might be a duplicate of existing issues. Please check:
fix(openai): OAuth transform treats Codex product budget as endpoint context limit #44821: Reports that OpenCode's OAuth transform uses Codex product budget as the endpoint context limit for GPT-5.6 Sol, covering the same underlying problem (incorrect/conservative OAuth context limits) and overlapping proposed resolutions (dynamic or override-based limit resolution vs. opt-in 1M variants).
Thanks for pointing this out. I believe #46527 is related to #44821, but it proposes a narrower and different change.
#44821 investigates the physical maximum input accepted by the OAuth endpoint and discusses dynamic or override-based limit resolution. This request does not attempt to determine or expose that physical endpoint maximum.
Instead, it proposes exposing the opt-in long-context tier already defined by Codex itself:
The bundled GPT-5.6 Sol, Terra, and Luna metadata uses context_window: 272000 and max_context_window: 872000.
Codex has a test confirming that setting model_context_window to 1_000_000 resolves these three models to 872_000.
OpenCode currently exposes only the conservative OAuth limits. #46527 proposes mirroring Codex's two-tier behavior:
keep the existing 272K input budget as the default;
add an explicit opt-in model entry using a 1M total context budget, with 872K input and 128K output;
leave API-key authentication and existing defaults unchanged.
Therefore, #44821 addresses the broader endpoint-capacity and dynamic-resolution problem, while #46527 proposes a specific selectable model-catalog feature based on Codex's existing long-context ceiling.
Thanks for the detailed proposal and the Codex references! You're asking for opt-in -1m versions of the GPT-5.6 Sol/Terra/Luna models (and their Fast versions) on ChatGPT sign-in. They would have a 1M context / 872K input / 128K output limit, while the current models keep their 272K input limit. Maintainers will consider it.
This was filed while v1 was the main line, and #46574 was closed asking for a port to v2. The request still applies to v2, where the cap now lives in a separate built-in plugin, opencode.provider.openai-context-caps (#58194).
v2 already has two documented ways around the cap:
Turn the cap off for all models: "plugins": ["-opencode.provider.openai-context-caps"]
To get a long-context entry next to the default one, you can also try a config alias with modelID (see "Aliases" in the models docs). I haven't checked that an alias's limit takes precedence over the cap, so please confirm it shows the higher limit:
Activity
github-actions commentedon Sep 1, 2026
This issue might be a duplicate of existing issues. Please check:
rhan637 commentedon Sep 1, 2026
Thanks for pointing this out. I believe #46527 is related to #44821, but it proposes a narrower and different change.
#44821 investigates the physical maximum input accepted by the OAuth endpoint and discusses dynamic or override-based limit resolution. This request does not attempt to determine or expose that physical endpoint maximum.
Instead, it proposes exposing the opt-in long-context tier already defined by Codex itself:
context_window: 272000andmax_context_window: 872000.model_context_windowto1_000_000resolves these three models to872_000.Sources:
OpenCode currently exposes only the conservative OAuth limits. #46527 proposes mirroring Codex's two-tier behavior:
Therefore, #44821 addresses the broader endpoint-capacity and dynamic-resolution problem, while #46527 proposes a specific selectable model-catalog feature based on Codex's existing long-context ceiling.
mary-ext commentedon Sep 4, 2026
if anyone comes into here looking for a plugin form
opencodejr commentedon Oct 28, 2026
Thanks for the detailed proposal and the Codex references! You're asking for opt-in
-1mversions of the GPT-5.6 Sol/Terra/Luna models (and their Fast versions) on ChatGPT sign-in. They would have a 1M context / 872K input / 128K output limit, while the current models keep their 272K input limit. Maintainers will consider it.This was filed while v1 was the main line, and #46574 was closed asking for a port to v2. The request still applies to v2, where the cap now lives in a separate built-in plugin,
opencode.provider.openai-context-caps(#58194).v2 already has two documented ways around the cap:
"plugins": ["-opencode.provider.openai-context-caps"]limitin config. feat(core): move ChatGPT context caps into a separate plugin #58194 says config is applied after the cap plugin.To get a long-context entry next to the default one, you can also try a config alias with
modelID(see "Aliases" in the models docs). I haven't checked that an alias'slimittakes precedence over the cap, so please confirm it shows the higher limit:{ "providers": { "openai": { "models": { "gpt-5.6-sol-1m": { "modelID": "gpt-5.6-sol", "name": "GPT 5.6 Sol (1M)", "limit": { "context": 1000000, "input": 872000, "output": 128000 } } } } } }Related issues:
limit, which would allow a1mvariant instead of a separate model