Skip to content

gpt 5.4 mini is not available in model picker when using API auth key #15843

Open

Description

@balboah

What version of the Codex App are you using (From “About Codex” dialog)?

26.324.21641 (1228)

What subscription do you have?

openai platform API key

What platform is your computer?

macOS

What issue are you seeing?

While logged into codex with ChatGPT, the gpt 5.4 mini model is available in the dropdown.
While logged into codex using an API key, it is not.

Image

What steps can reproduce the bug?

  • codex login --with-api-key
  • open codex app or codex cli, observe missing model

What is the expected behavior?

Models enabled in the API should also be available in the codex app model picker

Additional information

No response

Activity

  1. added
    app
    on Mar 26, 2026
  2. added
    bug
    auth
    on Mar 26, 2026
  3. added
    agent
    and removed
    auth
    app
    on Mar 26, 2026
  4. quantuan125 commented on Mar 27, 2026

    @quantuan125

    Not available on 0.116.0 codex CLI either, but updating to 0.117.0 (latest) fixes it

    Image
  5. bradsjm commented on Apr 7, 2026

    @bradsjm

    In refresh_available_models, API-key users hit an unconditional early return that prevents them from ever fetching the remote model catalog:

    if self.auth_manager.auth_mode() != Some(AuthMode::Chatgpt)
        && !self.provider.has_command_auth()
    {
        if matches!(
            refresh_strategy,
            RefreshStrategy::Offline | RefreshStrategy::OnlineIfUncached
        ) {
            self.try_load_cache().await;
        }
        return Ok(());  // ← always returns, never reaches fetch_and_update_models()
    }

    This creates a circular problem for API-key users (where auth_mode() == Some(AuthMode::ApiKey)):

    1. fetch_and_update_models() is unreachable because of the early return at line 410
    2. fetch_and_update_models() is the only place that calls persist_cache() (line 467-469), so the cache is never written by API-key users
    3. try_load_cache() requires the cache to be fresh (5-min TTL) and version-matched, so any cache from a prior ChatGPT session quickly becomes unusable
    4. The app falls back to the bundled models.json, which doesn't contain gpt-5.4-mini

    In contrast, ChatGPT auth users and command-auth users proceed past line 411 to the normal OnlineIfUncached path, which falls through to fetch_and_update_models() on cache miss

    The early return at line 410 should not be unconditional for API-key users who have valid credentials. The OnlineIfUncached and Online strategies should be allowed to reach fetch_and_update_models() when the user has a valid API key, just as they do for ChatGPT and command-auth users. The guard at lines 401-411 appears to have been intended for users with no auth at all (where a network fetch would fail anyway), but it also blocks authenticated API-key users.

  6. Reflyer823 commented on Apr 14, 2026

    @Reflyer823

    I have encountered the same issue. I'm using the enterprise unified routing API endpoint, which may not support forwarding requests for the model list. I think it's worth considering updating the built-in models.json content, or providing a user-defined configuration file for models.json.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions