[PR #12837] fix: filter out OAuth-only codex models for API key auth #14396

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/12837

State: open
Merged: No


gpt-5.3-codex is only accessible via the ChatGPT Codex endpoint (chatgpt.com/backend-api/codex/responses) which requires OAuth authentication. It is not available on the OpenAI API platform.

When a user authenticates with a standard OpenAI API key via 'opencode auth login', this model appears available but fails with a 404 error at runtime. Remove OAuth-only models from the provider model list for API key users.

Note: gpt-5.2-codex and other codex models that ARE available on the OpenAI API platform are intentionally kept.

What does this PR do?

Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Fixes #12839

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12837 **State:** open **Merged:** No --- gpt-5.3-codex is only accessible via the ChatGPT Codex endpoint (chatgpt.com/backend-api/codex/responses) which requires OAuth authentication. It is not available on the OpenAI API platform. When a user authenticates with a standard OpenAI API key via 'opencode auth login', this model appears available but fails with a 404 error at runtime. Remove OAuth-only models from the provider model list for API key users. Note: gpt-5.2-codex and other codex models that ARE available on the OpenAI API platform are intentionally kept. ### What does this PR do? Please provide a description of the issue (if there is one), the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the pr. **If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!** ### How did you verify your code works? Fixes #12839
yindo added the pull-request label 2026-02-16 18:19:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14396