Description
Description
The OpenAI Codex OAuth model transform still hardcodes GPT-5.6 Sol, Terra, and
Luna to:
{ context: 500_000, input: 372_000, output: 128_000 }That mapping was added by #36248 against the Codex catalog available on July 10.
OpenAI subsequently released Codex CLI 0.144.6 on July 18 with the explicit fix:
"corrected [GPT-5.6 Sol, Terra, and Luna] context windows to 272,000 tokens."
Codex CLI 0.145.0's bundled models.json still reports both context_window and
max_context_window as 272000 for all three GPT-5.6 variants, matching
GPT-5.5. OpenCode dev still applies the earlier 372k OAuth input override, so
compaction can be delayed beyond the window currently advertised by the
first-party Codex harness.
Following OpenCode's existing split-window convention for GPT-5.5, the current
Codex OAuth mapping for GPT-5.6 should be:
{ context: 400_000, input: 272_000, output: 128_000 }Direct OpenAI API-key metadata should remain unchanged at the API's full model
limits. This only concerns requests routed through ChatGPT/Codex OAuth.
References:
- Previous report and now-stale values: GPT-5.6 Codex OAuth uses 1.05M metadata instead of 500k total / 372k input limits #36247
- Previous fix: fix(openai): use codex context limits for gpt-5.6 #36248
- Codex 0.144.6 release: https://github.com/openai/codex/releases/tag/rust-v0.144.6
- Codex 0.145.0 catalog: https://github.com/openai/codex/blob/rust-v0.145.0/codex-rs/models-manager/models.json
- Current OpenCode OAuth transform: https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/plugin/openai/codex.ts
- Longer-term provider-specific metadata proposal: Feature: add a separate OpenAI Codex provider for OAuth-specific model limits models.dev#3183
Plugins
None required to reproduce. The mismatch is in the built-in OpenAI Codex OAuth
model transform.
OpenCode version
1.18.5 and current dev as of 2026-07-26.
Steps to reproduce
- Authenticate the
openaiprovider using ChatGPT Pro/Plus OAuth. - Run
opencode models openai --verbose. - Inspect
limitforgpt-5.6-sol,gpt-5.6-terra, orgpt-5.6-luna. - Observe
context: 500000,input: 372000,output: 128000. - Compare with the Codex 0.145.0 bundled catalog, where all three report
context_window: 272000andmax_context_window: 272000.
Screenshot and/or share link
Not applicable; this is directly visible in the two model catalogs.
Operating System
Debian 13 Linux, x86_64.
Terminal
OpenCode web/headless server and CLI.
Activity