# gpt-5.1-codex-mini

Calls to the model gpt-5.1-codex-mini on OpenAI stopped working on July 23, 2026.

On July 23, 2026, the model gpt-5.1-codex-mini was retired. Requests targeting model gpt-5.1-codex-mini fail since that date. Any application still calling this snapshot no longer receives responses.

## The error OpenAI returns once gpt-5.1-codex-mini is gone

HTTP 404

```json
{"error":{"message":"The model `gpt-5.1-codex-mini` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations","type":"invalid_request_error","param":null,"code":"model_not_found"}}
```

## What to use instead

Move to gpt-5.6-terra, recommended by OpenAI.

- API: OpenAI (api.openai.com)
- Model: gpt-5.1-codex-mini
- Released: November 13, 2025 (models.dev)
- Kind: Model retirement
- Takes effect: July 23, 2026
- Calls after that day: fail
- Calls it hits: `model gpt-5.1-codex-mini`
- Source: [Deprecations page](https://developers.openai.com/api/docs/deprecations)
- Verified: November 6, 2026, against OpenAI's own pages
- Page: https://www.okapi.bot/models/openai/gpt-5.1-codex-mini/

## OpenAI's words

> Shutdown date: July 23, 2026; Model snapshot: gpt-5.1-codex-mini; Substitute model: gpt-5.6-terra

Okapi finds the calls this change hits in your repo and opens the pull request with the fix: https://github.com/apps/okapi-agent
