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

Open
opened 2026-02-16 18:11:08 -05:00 by yindo · 4 comments
Owner

Originally created by @iyoda on GitHub (Feb 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

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.
Originally created by @iyoda on GitHub (Feb 9, 2026). Originally assigned to: @rekram1-node on GitHub. 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](https://platform.openai.com/settings/organization/limits). 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.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2026):

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

Related (but different issues):

  • #12570: Responses using GPT-5.3-Codex terminate early
  • #12355: xhigh reasoning variant unavailable for GPT-5.3 Codex
  • #8622: gpt-5.2-codex TypeError with OAuth

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

@github-actions[bot] commented on GitHub (Feb 9, 2026): I've searched for potential duplicates and found several related GPT-5.3-Codex issues, but no exact duplicates: **Related (but different issues):** - #12570: Responses using GPT-5.3-Codex terminate early - #12355: xhigh reasoning variant unavailable for GPT-5.3 Codex - #8622: gpt-5.2-codex TypeError with OAuth This issue appears to be unique regarding the authentication-based availability filtering and 404 error when using API keys with GPT-5.3-Codex.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2026):

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.

@github-actions[bot] commented on GitHub (Feb 9, 2026): 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.
Author
Owner

@R44VC0RP commented on GitHub (Feb 9, 2026):

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.

@R44VC0RP commented on GitHub (Feb 9, 2026): 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.
Author
Owner

@iyoda commented on GitHub (Feb 15, 2026):

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

@iyoda commented on GitHub (Feb 15, 2026): Thanks for the confirmation! Sounds good — using gpt-5.2-codex for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8908