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: add a separate OpenAI Codex provider for OAuth-specific model limits #3183
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.
This issue needs maintainer review, and no automated fix was opened.
This is a feature/architectural proposal rather than a concrete catalog data fix. The core ask is to create a new provider entity (openai-codex) to represent a distinct serving surface, and the issue itself explicitly defers the design to maintainer preference ("The exact provider ID and integration metadata can follow maintainer preference"). Specifically:
New provider creation is a blocker-level change. Per AGENTS.md, every new provider must ship a compliant providers/<id>/logo.svg, and adding a provider is a structural decision that warrants maintainer sign-off — not something to auto-generate.
It's a policy/product discussion. Whether Codex OAuth warrants a separate provider versus another representation (e.g., a documented limit override mechanism) is a design call, not a factual correction to existing metadata.
The cited limits are not from authoritative provider documentation. The values come from OpenCode's codex debug models CLI output and OpenCode's internal override history, not from OpenAI's first-party API docs or pricing/model pages. They reflect one client's handling rather than a provider-published catalog I can independently verify.
If a maintainer decides to proceed with a separate openai-codex provider, the follow-up work (provider TOML + logo + base_model-backed model entries with overridden [limit] blocks) would be actionable, but it should be scoped after that decision.
@rekram1-node I'd like to hear your thoughts on this. You worked on both the previous GPT-5.5 Codex limit handling and the GPT-5.6 models in models.dev, so your perspective on whether a separate Codex provider is the right long-term approach would be especially useful.
openai changes the context limits at will to address token consumption problems it seems. Getting this wrong causes grief in opencode if using the plans
Draft implementation: #13161 (openai-codex, GPT-6.1 Sol and Terra, v2_only, so v1 is unchanged).
One data point on limits: the 372K/500K values are Codex's client settings (context_window / max_context_window in the Codex model catalog: 500K / 872K for GPT-6.1). The backend itself accepts the API's 922K input on a ChatGPT plan:
So the PR keeps the API limits; a working-window default looks like a client setting rather than the model's limit. Happy to change that if you see it differently.
Activity
github-actions commentedon Jul 10, 2026
This issue needs maintainer review, and no automated fix was opened.
This is a feature/architectural proposal rather than a concrete catalog data fix. The core ask is to create a new provider entity (
openai-codex) to represent a distinct serving surface, and the issue itself explicitly defers the design to maintainer preference ("The exact provider ID and integration metadata can follow maintainer preference"). Specifically:AGENTS.md, every new provider must ship a compliantproviders/<id>/logo.svg, and adding a provider is a structural decision that warrants maintainer sign-off — not something to auto-generate.codex debug modelsCLI output and OpenCode's internal override history, not from OpenAI's first-party API docs or pricing/model pages. They reflect one client's handling rather than a provider-published catalog I can independently verify.If a maintainer decides to proceed with a separate
openai-codexprovider, the follow-up work (provider TOML + logo +base_model-backed model entries with overridden[limit]blocks) would be actionable, but it should be scoped after that decision.nabilfreeman commentedon Jul 10, 2026
@rekram1-node I'd like to hear your thoughts on this. You worked on both the previous GPT-5.5 Codex limit handling and the GPT-5.6 models in models.dev, so your perspective on whether a separate Codex provider is the right long-term approach would be especially useful.
timrichardson commentedon Jul 13, 2026
openai changes the context limits at will to address token consumption problems it seems. Getting this wrong causes grief in opencode if using the plans
jimsimon commentedon Aug 6, 2026
I believe this would also allow harnesses that leverage codex (CLI or OAuth) to list "Ultra" as a
reasoning_optionfor models that support itngvoicu commentedon Nov 9, 2026
Draft implementation: #13161 (
openai-codex, GPT-6.1 Sol and Terra,v2_only, so v1 is unchanged).One data point on limits: the 372K/500K values are Codex's client settings (
context_window/max_context_windowin the Codex model catalog: 500K / 872K for GPT-6.1). The backend itself accepts the API's 922K input on a ChatGPT plan:gpt-6.1-sol: 921,807 accepted, 921,957 rejected (context_too_large);gpt-6.1-terra: 920,870 accepted, 921,875 rejected.So the PR keeps the API limits; a working-window default looks like a client setting rather than the model's limit. Happy to change that if you see it differently.
feat(openai-codex): ChatGPT plan through Codex (proposal for anomalyc…
feat(openai-codex): ChatGPT plan through Codex (proposal for anomalyc…
feat(openai-codex): ChatGPT plan through Codex (proposal for anomalyc…
feat(openai-codex): ChatGPT plan through Codex (proposal for anomalyc…