A retired model ID broke my pipeline for days
A workflow of mine failed 84 times in a row because it asked for a hosted model that had been retired on a published schedule. The two-line fix, why nothing told me, and the scanner I wrote to find the next one.
The fix was one string, changed in two workflows. Each had a step that called a hosted language model by a dated ID, claude-sonnet-4-20250514, and the provider had retired that model. I replaced the ID with a current one on July 17 and the step started working again.
The repair was small. Before it, the pipeline had been failing since about July 14, and its run history showed 84 failed runs in a row. I had not looked.
The second change
The swap did not work the first time. The old model accepted a temperature setting in the request and my workflows sent one. The replacement rejected it with a 400 error saying the parameter was deprecated for that model. I removed the setting and the call went through.
That is worth planning for. Moving to a newer model can change which request parameters are accepted, so a model swap is a small migration and deserves a test run before the old model's end date. I did mine after the end date, in production, which is the expensive order to do it in.
What the pipeline does and where it stopped
The pipeline runs every four hours. It reads a set of news feeds, asks a model to score each new item, picks the best one, asks the model to draft a short post about it and publishes the post to a social account. I run two copies with different feeds.
The scoring call comes early. When the model ID stopped resolving, that call returned a 404, the run ended there, and nothing after it happened. No draft was written and nothing was published.
Every one of those runs was recorded as an error in the workflow tool's own history, which I was not watching. Nothing downstream was waiting for the output. A post that never gets written does not generate a complaint. The only signal was an absence, and I had nothing watching for one.
The date was published
The fault here is mine. Anthropic keeps a public page of model deprecations. It defines the lifecycle in four stages, and the last one reads: "Retired: The model is no longer available for use. Requests to retired models fail." The page says the company gives "at least 60 days' notice before model retirement for publicly released models," and it lists each announcement with the retirement date and a recommended replacement. The entry for this model is dated April 14.
So the information existed, in public, months before my runs began to fail. I had pinned a dated ID in a workflow and never recorded anywhere that the ID had an end date.
- April 14The provider's deprecation page carries an entry for this model
- About July 14The model ID stops resolving. Runs fail with a 404, 84 in a row
- July 17I replace the ID in two workflows and remove the temperature setting
- July 17I build a scanner to find hardcoded model IDs across my projects
The provider's page says it gives at least 60 days' notice before a model is retired.
Treat a pinned model ID the way you treat a certificate. It has an end date, the date is published ahead of time, and on that date requests fail. I wrote in February about the difference between expired and revoked certificates. A model retirement is the expiry kind. It arrives on schedule and it is preventable with a calendar.
The scanner
The workflow was one place with a model ID typed into it. On July 17 I also built a scanner to find the rest of them across my projects.
It walks my repositories, pulls out anything that looks like a hardcoded model ID and checks each one against a catalog of lifecycle data for the providers I use. It reports three classes: retired, deprecated and unknown.
A few design decisions turned out to matter.
The catalog is a local file. A default run makes no network calls. A deprecated entry carries its retirement date, and the scanner promotes it to retired when that date passes, so the report gets stricter over time without anyone editing it.
The live check can only confirm. There is an optional mode that asks each provider's API which models exist. I let it mark a model as fine, and I do not let it mark one as retired. An API key with restricted scope sees a shorter list than a full one, and an absent model would then be reported dead when it is merely invisible to that key.
The unknown bucket needed gates. My first version flagged about 3,600 unknown strings. Package names, command-line tools, subdomains and file names can all look like model IDs to a pattern match. I now require a candidate to appear in a quoted or assigned context, to have a plausible shape and to contain a digit. That brought the count down to about 40, which is a list a person will read.
It skips itself. The scanner ignores its own directory and its own report. Otherwise its first finding is its own catalog of retired models.
It runs weekly in two places: on the host that runs my automation, and on my laptop, where it covers every repository I have checked out. It alerts on retired and deprecated findings and will not repeat the same finding for six days.
What the first run found
More than the workflow.
The same retired ID appeared in several other projects. An older model ID, retired in April, was still in one feature of an application belonging to one of my side businesses. A fix for that is open. A few old IDs sit in test files where they do no harm.
The unknown bucket earned its place too. It held model IDs with typos in them, including one written with a dot where the real ID has a hyphen. A request with that ID would come back as a 404.
I am working through the list.
What I would do in any codebase
Keep model IDs in one place for each application. A single configuration value is easy to find and easy to change. The same ID typed into several files gets changed in most of them.
Record the end date when you pin the ID. If the provider publishes a deprecation page, check it when you choose the model and put the retirement date wherever you keep certificate renewals.
Test the replacement before the date. A new model can behave differently on your task and can reject parameters the old one took. The example set I described in February exists for this.
Alert on missing output. If a pipeline is supposed to produce something every few hours, then nothing for a day is an event. This is the check that would have cut my outage from days to hours, and it would have done so without knowing anything about models.
Ask the provider what you are calling. Anthropic's page describes exporting API usage broken down by key and model, which finds the callers a code search misses.
One caveat. A scanner like mine finds IDs in code I can read. It will not find one stored in a database row or typed into a tool's settings screen. A workflow tool that keeps its definitions in its own database is that kind of place, so the scanner covers it only where the workflows are also exported to files.
As for the pipeline, the model steps pass again. It published once that night and then stopped at its final step for an unrelated reason, which is a separate story.
Views are my own.