Skip to content

OpenAI Codex OAuth GPT-5.6 limits stale after Codex 0.144.6 correction #38976

Description

@bernhardberger

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:

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

  1. Authenticate the openai provider using ChatGPT Pro/Plus OAuth.
  2. Run opencode models openai --verbose.
  3. Inspect limit for gpt-5.6-sol, gpt-5.6-terra, or gpt-5.6-luna.
  4. Observe context: 500000, input: 372000, output: 128000.
  5. Compare with the Codex 0.145.0 bundled catalog, where all three report
    context_window: 272000 and max_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions