Skip to content

Codex (ChatGPT account) lists *-pro models it can't serve — gpt-5.5-pro shown then rejected by backend #32435

Description

@devinoldenburg

Description

On a ChatGPT (Plus/Pro) OAuth account, gpt-5.5-pro is offered as a selectable model but every request to it fails:

Bad Request: {"detail":"The 'gpt-5.5-pro' model is not supported when using Codex with a ChatGPT account."}

This is the precise root-cause write-up for #26115 (which was a user report with most fields left blank).

Root causepackages/opencode/src/plugin/openai/codex.ts, the OAuth models() filter:

.filter(([, model]) => {
  if (ALLOWED_MODELS.has(model.api.id)) return true
  const match = model.api.id.match(/^gpt-(\d+\.\d+)/)
  return match ? parseFloat(match[1]) > 5.4 : false
})

For a ChatGPT account this keeps an explicit allowlist plus a fallback that allows any gpt-<version> newer than 5.4. gpt-5.5-pro matches the fallback (5.5 > 5.4) and is therefore listed — but the Codex backend (chatgpt.com/backend-api/codex/responses) only serves -pro models to API-key auth, never to ChatGPT accounts. So the model is shown and then rejected at request time.

This applies to the whole -pro family (gpt-5.5-pro, gpt-5.4-pro, …). #19366 documented the same behavior for gpt-5.4-pro, with a reproduction confirming the backend rejects it even after patching the local allowlist.

Secondary precision bug in the same heuristic: parseFloat("5.10") is 5.1, so a future gpt-5.10 would be wrongly excluded by the > 5.4 check (dotted-version strings shouldn't be compared as floats).

Expected: -pro models that a ChatGPT account can't use should not appear as selectable for that auth type — matching the expected behavior described in #26115.

A fix is up in #32276.

Plugins

Built-in OpenAI / Codex auth (ChatGPT OAuth login).

OpenCode version

Reproduced against current dev; originally reported on the latest release in #26115.

Steps to reproduce

  1. Authenticate OpenAI with a ChatGPT Plus/Pro account (OAuth), not an API key.
  2. Select model gpt-5.5-pro.
  3. Send any message.
  4. Request fails with The 'gpt-5.5-pro' model is not supported when using Codex with a ChatGPT account.

Operating System

Windows 11 (per #26115); not OS-specific — the filtering logic is platform-independent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions