Skip to content

gpt-5.3-codex fails with 404 when authenticated via OpenAI API key #12839

Closed

Description

@iyoda

Description
When a user authenticates with a standard OpenAI API key via opencode auth login → "Manually enter API Key", gpt-5.3-codex appears as an available model but fails with a 404 error at runtime.
Root Cause
gpt-5.3-codex is only available via the ChatGPT Codex endpoint (chatgpt.com/backend-api/codex/responses), which requires OAuth authentication. It is not listed on the OpenAI API platform.
The codex plugin (src/plugin/codex.ts) rewrites the request URL to the ChatGPT endpoint for OAuth users, but for API key users it returns early without any filtering:
if (auth.type !== "oauth") return {}
This means gpt-5.3-codex (from models.dev) remains in the available model list, but requests go to api.openai.com/v1/responses where the model does not exist → 404.
Note: Other codex models like gpt-5.2-codex are available on the OpenAI API platform and work correctly with API keys.
Steps to Reproduce

  1. Run opencode auth login
  2. Select OpenAI → "Manually enter API Key"
  3. Enter a valid OpenAI API key
  4. Select gpt-5.3-codex as the model
  5. Send a message → 404 error
    Expected Behavior
    gpt-5.3-codex should not appear as available for API key users, or a clear error should explain that OAuth is required.

Activity

  1. github-actions commented on Feb 9, 2026

    @github-actions
    Contributor

    I've searched for potential duplicates and found several related GPT-5.3-Codex issues, but no exact duplicates:

    Related (but different issues):

    This issue appears to be unique regarding the authentication-based availability filtering and 404 error when using API keys with GPT-5.3-Codex.

  2. github-actions commented on Feb 9, 2026

    @github-actions
    Contributor

    No exact duplicates found. This issue appears to be unique regarding the authentication-based model availability filtering for GPT-5.3-Codex with API keys.

  3. added a commit that references this issue on Feb 9, 2026
    8970356
  4. R44VC0RP commented on Feb 9, 2026

    @R44VC0RP
    Contributor

    Confirmed — gpt-5.3-codex is OAuth-only and shouldn't be visible for API key users.

    Your PR #12837 looks good, filtering it out for non-OAuth users is the right fix. We'll review and merge it.

    For now, if you're using an API key, stick with gpt-5.2-codex or other models that are available on the OpenAI API platform.

  5. iyoda commented on Feb 15, 2026

    @iyoda
    Author

    Thanks for the confirmation! Sounds good — using gpt-5.2-codex for now.

  6. felixzieger commented on Feb 25, 2026

    @felixzieger

    The model is available via API now and works with opencode.

  7. jomach commented on Feb 27, 2026

    @jomach

    install opencode -> /connect -> Github Copilot -> /models -> GPT-5.2-Codex

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

Metadata

Metadata

Assignees

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