Skip to content

Feature: add a separate OpenAI Codex provider for OAuth-specific model limits #3183

Description

@nabilfreeman

Proposal

Add a separate OpenAI Codex provider for models served through ChatGPT/Codex OAuth.

The main openai provider should continue describing direct API access. The Codex provider can inherit shared model metadata with base_model and override the limits that differ on the Codex backend. Harnesses such as OpenCode can then select the correct provider when Codex OAuth is active.

This has moved beyond a one-time client workaround: four current Codex models now have different limits from their direct API definitions.

Evidence

Models Direct OpenAI API Codex OAuth
gpt-5.5 1,050K context / 922K input / 128K output 400K context / 272K input / 128K output
gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna 1,050K context / 922K input / 128K output 500K context / 372K input / 128K output

The Codex values can be independently checked with codex debug models. GPT-5.5 reports 272000; all three GPT-5.6 models report 372000.

Related

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