codex-mini-latest — Retired
- Deprecated
- —
- Shutdown
- 2026-02-12
- Status
- deprecated
- Replacement
- gpt-5-codex-mini
Quick fix — copy & paste
Choose your language. The "before" block matches the deprecated call; the "after" block is the drop-in replacement.
# OpenAI: codex-mini-latest (deprecated)
model = "codex-mini-latest" # Replacement
model = "gpt-5-codex-mini" // OpenAI: codex-mini-latest (deprecated)
const model = "codex-mini-latest"; // Replacement
const model = "gpt-5-codex-mini"; "model": "codex-mini-latest" "model": "gpt-5-codex-mini" This migration was generated automatically from the model rename. If your code does more than swap a model id, double-check request/response shapes against the official OpenAI migration guide.
Error messages
Seeing one of these? You're in the right place.
-
model_not_found: codex-mini-latest -
The model `codex-mini-latest` has been deprecated -
The model `codex-mini-latest` does not exist or you do not have access to it
Replacement options
-
gpt-5-codex-miniCompare token cost →
Other OpenAI deprecations
What this means for your code
codex-mini-latest is a code-completion or code-specific model used for IDE integrations. Code models often have different context window sizes, tokenization, and stop-sequence handling. Replacements may change the prompt format expected for FIM (fill-in-the-middle) completions.
codex-mini-latest was retired by OpenAI on 2026-02-12. API calls now return an error and the model is no longer accessible. New code should use gpt-5-codex-mini; legacy code that still references this model id needs to be updated immediately.
Find every call in your codebase
Before you change anything, locate every place the deprecated model id is referenced. Search source files, environment files, feature flags, and config repos. Use these commands from your project root:
Python projects
grep -rn '"codex-mini-latest"' --include="*.py" . JavaScript / TypeScript projects
grep -rn '"codex-mini-latest"' --include="*.{js,ts,tsx,jsx}" . Anywhere (configs, scripts, infra)
grep -rn "codex-mini-latest" . Migration checklist
Steps in order. Skip any that don't apply, but read the whole list — for code models, the non-obvious steps are usually the ones that break in production.
- 1. Update the model id in your code-completion service
- 2. Verify FIM markers (<|fim_prefix|> etc.) are supported by the new model
- 3. Re-test completions on representative source files in your supported languages
- 4. Recompute cost per accepted suggestion using new tokenizer + new pricing
- 5. Update any client-side cache keys that include the model id
Will this migration cost more?
Switching from codex-mini-latest to gpt-5-codex-mini could change your costs significantly. Calculate the exact difference for your prompts.
Open the cost calculator →