Skip to content

feat(openai): add pricing for the Codex and chat-latest models - #3836

Closed
alexander-bal wants to merge 1 commit into
anomalyco:devfrom
alexander-bal:add-openai-codex-pricing
Closed

feat(openai): add pricing for the Codex and chat-latest models#3836
alexander-bal wants to merge 1 commit into
anomalyco:devfrom
alexander-bal:add-openai-codex-pricing

Conversation

@alexander-bal

Copy link
Copy Markdown

What

Adds provider entries for seven OpenAI models that have models/openai/ metadata but no providers/openai/models/ entry, so they never appear under the openai provider in api.json and consumers have no price for them:

model input cached input output
gpt-5-codex $1.25 $0.125 $10.00
gpt-5.1-codex $1.25 $0.125 $10.00
gpt-5.1-codex-max $1.25 $0.125 $10.00
gpt-5.1-codex-mini $0.25 $0.025 $2.00
gpt-5.2-codex $1.75 $0.175 $14.00
gpt-5-chat-latest $1.25 $0.125 $10.00
gpt-5.1-chat-latest $1.25 $0.125 $10.00

The gpt-5.3 generation onward is already covered — gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.2-chat-latest and gpt-5.3-chat-latest all have provider entries. These seven are the ones below that line.

Source

Prices are from OpenAI's published price list, standard tier: https://developers.openai.com/api/docs/pricing

Each file cites it in a leading comment block, per the guideline that only a leading header survives the sync rewrite.

Notes

Every entry uses base_model, since models/openai/<id>.toml exists for all seven — no provider-agnostic facts are duplicated inline.

reasoning_options is declared because the inherited metadata sets reasoning = true and the schema requires it. Only the gpt-5.2-codex model page publishes its accepted effort values (low, medium, high, xhigh), so that one is filled in; the other six use reasoning_options = [] per the guideline to leave it empty rather than assert a control that is not documented. Happy to fill those in if you have a source I missed.

bun validate passes.

The `models/openai/` metadata for these seven already exists, but no provider
entry serves them, so they are absent from the openai provider in api.json and
anything reading it has no price to use.

Each is a `base_model` entry carrying only `[cost]`, plus the `reasoning_options`
the schema requires. Only gpt-5.2-codex documents its accepted effort values, so
the rest use an empty array per the contribution guidelines rather than assert
values that are not published.
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/openai/models/gpt-5-codex.toml:8 - Check: reasoning_options must reflect the OpenAI API surface for each reasoning model, using same-model / same-surface peers as review context. Why: These five Codex entries set reasoning_options = [], but no existing providers/openai reasoning model uses an empty list, and same-ID Azure peers (OpenAI-compatible) already declare effort: gpt-5-codex / gpt-5.1-codex / gpt-5.1-codex-minilow|medium|high; gpt-5.1-codex-maxlow|medium|high|xhigh. OpenRouter/Vercel/llmgateway agree. Empty options will tell consumers OpenAI exposes no effort control when peers indicate it does. Action: Verify OpenAI’s accepted reasoning.effort / reasoning_effort values for each model and replace [] with the verified effort list (start from the Azure/OpenRouter peers above; do not invent none/xhigh without evidence). Apply the same fix in gpt-5.1-codex.toml, gpt-5.1-codex-max.toml, and gpt-5.1-codex-mini.toml.
  • [low] [possible mistake] providers/openai/models/gpt-5-chat-latest.toml:8 - Check: Chat-latest reasoning controls on the native OpenAI provider. Why: gpt-5-chat-latest and gpt-5.1-chat-latest use reasoning_options = [] while same-provider sibling gpt-5.2-chat-latest declares effort = ["medium"], and no other OpenAI provider reasoning model uses []. Gateway peers also use empty lists, so this may be correct if effort is fixed/undocumented—but it is inconsistent with the chat-latest pattern already on this provider. Action: Confirm against OpenAI model/API docs whether these IDs accept any effort values (including a fixed medium); if they do, declare them; only keep [] if no caller control is actually accepted.

@rekram1-node

Copy link
Copy Markdown
Collaborator

Thanks for the PR — prices look correct against the specialized models table, and the base_model shape is fine. Closing because these models are no longer served on the OpenAI API.

They were intentionally removed in #3707 after OpenAI's 2026-07-23 shutdown (deprecations, 2026-04-22 notice):

Model Suggested replacement
gpt-5-codex gpt-5.6-sol
gpt-5.1-codex gpt-5.6-sol
gpt-5.1-codex-max gpt-5.6-sol
gpt-5.1-codex-mini gpt-5.6-terra
gpt-5.2-codex gpt-5.6-sol
gpt-5-chat-latest gpt-5.6-sol
gpt-5.1-chat-latest gpt-5.6-sol

Re-adding them would put dead IDs back in the openai provider catalog. models/openai/ metadata can stay for other gateways that still proxy these IDs; we only drop fully shut-down models from providers/openai.

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.

2 participants