Skip to content

feat: add OpenAI Codex provider metadata - #3754

Open
opencode-agent[bot] wants to merge 1 commit into
devfrom
openai-codex
Open

feat: add OpenAI Codex provider metadata#3754
opencode-agent[bot] wants to merge 1 commit into
devfrom
openai-codex

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • add an openai-codex provider for ChatGPT subscription models served through the Codex backend
  • inherit provider-agnostic OpenAI model metadata while publishing Codex-specific 400K context / 272K input / 128K output limits
  • allow OAuth-only providers to declare an empty environment-variable list instead of inventing an API-key credential

OpenAI corrected the GPT-5.6 Codex window to 272K in Codex 0.144.6. Keeping this metadata separate preserves the direct OpenAI API models' 1.05M context window and gives harnesses a canonical route-specific source.

Sources:

@rekram1-node, this is the model-catalog half of the GPT-5.6 Sol compaction failure Kit reproduced through ChatGPT OAuth.

Verification

  • bun validate
  • bun test packages/core/test/schema.test.ts
  • catalog generation tests covering metadata inheritance and schema projection pass; the full file retains a pre-existing open-weight metadata failure unrelated to this change

Fixes #3183

Requested by: @kitlangton (Kit via Slack)

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [violation] providers/openai-codex/models/gpt-5.5.toml:4 - Check: Provider models must author cost (AGENTS.md required fields; cost is provider-specific and not inherited via base_model). Why: All four new Codex models omit [cost]. Subscription/coding-plan peers (e.g. kimi-for-coding, zai-coding-plan, minimax-coding-plan) publish explicit zero pricing; omitting cost leaves catalog consumers without a provider-authored price. Action: Add a provider-local [cost] on each model—typically input/output/cache_* = 0 for ChatGPT subscription usage, or verified non-zero rates if Codex bills differently—and cite what the values represent.
  • [medium] [possible mistake] providers/openai-codex/models/gpt-5.5.toml:12 - Check: experimental.modes must reflect controls this inference route actually accepts. Why: Every model copies OpenAI API service_tier = "priority" under [experimental.modes.fast]. That is a paid OpenAI API body field; this provider is the ChatGPT/Codex OAuth backend (https://chatgpt.com/backend-api/codex). Closest subscription-style peers (e.g. GitHub Copilot GPT entries) do not advertise this mode. Publishing it can make harnesses send an unsupported body on this route. Action: Verify Codex accepts service_tier: "priority" on this API; if not, drop the fast mode (or replace it with a Codex-documented control).

@Cretezy

Cretezy commented Aug 9, 2026

Copy link
Copy Markdown

Currently, the following models are offered (on Pro plan): gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.3-codex-spark.

I believe we may need to introduce a way to gate models per-plan, as spark models are Pro-only.

5.6 Sol, Terra, and Luna offer low, medium, high, xhigh, max, and ultra. Also also likely none, even if not exposed through Codex. I believe ultra is also Pro-only.

For 5.5/5.4/5.4-mini/5.3-codex-spark, low, medium, high, and xhigh are offered. None also probably.

I think keeping this to 5.6 models makes sense though, as those are what most users will want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants