gpt-5-codex-mini does not work with api-key

Resolved 💬 1 comment Opened Nov 11, 2025 by divinity76 Closed Jan 28, 2026

What version of Codex is running?

codex-cli 0.57.0

What subscription do you have?

Business

Which model were you using?

gpt-5-codex-mini

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

GPT-5-codex-mini does not work when codex is configured to use api key instead of codex login.

What steps can reproduce the bug?

echo '{"OPENAI_API_KEY": "sk-..."}' > ~/.codex/auth.json
codex greetings

What is the expected behavior?

$ codex greetings
╭─────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.57.0)                           │
│                                                     │
│ model:     gpt-5-codex-mini high   /model to change │
│ directory: ~                                        │
╰─────────────────────────────────────────────────────╯

  To get started, describe a task or try one of these commands:

  /init - create an AGENTS.md file with instructions for Codex
  /status - show current session configuration
  /approvals - choose what Codex can do without approval
  /model - choose what model and reasoning effort to use
  /review - review any changes and find issues


› greetings


• Hi there!

Additional information

Here is the actual behavior:

$ codex greetings
╭─────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.57.0)                           │
│                                                     │
│ model:     gpt-5-codex-mini high   /model to change │
│ directory: /temp2                                   │
╰─────────────────────────────────────────────────────╯

  To get started, describe a task or try one of these commands:

  /init - create an AGENTS.md file with instructions for Codex
  /status - show current session configuration
  /approvals - choose what Codex can do without approval
  /model - choose what model and reasoning effort to use
  /review - review any changes and find issues


› greetings


■ unexpected status 400 Bad Request: {
  "error": {
    "message": "The requested model 'gpt-5-codex-mini' does not exist.",
    "type": "invalid_request_error",
    "param": "model",
    "code": "model_not_found"
  }
}

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗