On 5 August 2026 Anthropic turned off claude-opus-4-1-20250805 in the API. This is not a "deprecated" label: the model is gone, and requests to that ID now return an error.
If any of your services still calls the old identifier, it has already stopped working. Below is a short guide to where to move and where forgotten references tend to hide.
Where to move
Anthropic recommends claude-opus-4-8. In most cases the move is a swap of the model-name string, and behaviour and request format stay the same.
If you would rather go straight to the newest option, there is claude-opus-5. It shipped on 24 July and is faster and cheaper on the same tasks.
Where forgotten references hide
Changing the code is the easy bit. The hard part is that a model name rarely lives in just one place.
Go through this list:
- environment variables on every stage, the staging one everybody forgets included;
- CI and runner configs;
- dashboards and alerts that have the model name baked into a filter;
- background jobs and schedulers that fire once a week and so never crossed your path;
- docs and examples in the repo, since a new developer will copy a dead ID from there.
How to confirm you migrated everything
The most reliable check is to grep the entire repository for the old identifier, configs and infrastructure files included:
grep -rn "opus-4-1" . --include="*.ts" --include="*.py" --include="*.yml" --include="*.yaml" --include="*.env*"
Check the secrets and variables in your hosting panel separately. Grep cannot reach them.
What to do if production is already down
The error comes from the API, not from your application, so the logs show a rejection from Anthropic rather than an exception in your own code. Change the model ID and restart the service. Nothing needs rolling back.
If you run several services, start with the one closest to the user. Leave the background jobs for a second pass.
How to avoid this next time
Anthropic retires models on a schedule and warns ahead, usually a couple of months before. Opus 4.1 followed the pattern: the notice went out on 5 June.
Two habits take care of the problem:
- Keep the model name in a single constant or a single environment variable, not scattered through the code.
- Follow the page with model shutdown dates and set yourself a reminder a month before each one.
Through codexkey
Our gateway serves stable model IDs, so a version change on the provider's side does not break your code. The list of available models is always on the pricing page. The request format stays the same: both Anthropic Messages and the OpenAI-compatible one are supported.
You can check that everything works on a minimal balance. The minimum top-up is one dollar, and we add another one for joining our channel.