Skip to content

Plan a model rollback before changing production

Updated 5 min readFor ML engineers and on-call owners of production AI applications

A model rollback restores a tested state of the whole application: model, prompt, tools, parsing, engine and configuration together. Restoring only the model name can create a combination nobody ever tested, and the old model may no longer exist, since hosted providers retire versions on published schedules. Version these parts as one bundle, write triggers an on-call person can act on, and rehearse the return before the rollout. Plan for what the bad version already produced, such as saved answers and completed actions, because switching back does not repair them.

Three ways a rollback fails

Most rollback plans read: change the model name back. That plan fails in three ordinary ways, and you can only prevent each one before the incident starts.

The first is that the old model is gone. Hosted versions have end dates, and the rollback target needs to be alive for as long as you might want it. The second is a partial revert, where the model returns while the prompt, parser or router stays new, producing a combination that has never been tested. The third is the work done during the bad period. Saved answers, scheduled reports and proposed actions remain after the switch, and nobody is assigned to them.

Check that the way back still exists

Retirement schedules set how long your rollback target lasts. Anthropic commits to at least 60 days’ notice before retiring a publicly released model, and says requests to retired models fail. As an example from its current table, claude-sonnet-4-5-20250929 was deprecated on September 30, 2026 with retirement set for November 30, 2026, or 61 days. OpenAI’s stated minimums are 6 months for generally available models, 3 months for specialized variants, and possibly as little as 2 weeks for previews, and pinned snapshots get their own shutdown dates. Partner platforms can differ too: Anthropic notes that Bedrock and Google-managed deployments set their own schedules.

Put the target’s retirement date in the release record, along with an owner for the notice email. I wouldn’t upgrade onto a preview model without knowing what I’d fall back to in two weeks’ time. Self-hosting gives you more control here, provided you keep your own copy. Mirror the weights, keep the old image, and confirm the files are still loadable, because a registry cleanup or a removed artifact does the same damage as a retirement. Also check that your application still accepts the old model’s parameters, since a later API version may have removed what it needs.

A tool’s undo covers less than you think

The next trap is assuming your deployment tool restores everything. Kubernetes is a clear example. Its documentation says a Deployment revision is created only when the Pod template changes, and that a rollback restores only the Pod template part. A prompt in a ConfigMap, a model name in a separate secret, or a setting changed outside that template stays new after kubectl rollout undo reports success. Setting revisionHistoryLimit to 0 removes the ability to undo at all; the default keeps 10 old ReplicaSets.

Make the bundle a single versioned thing. Put a release ID on every part of the application path, and have a single change that moves all of them. For a self-hosted stack, remember that NIM profile IDs can change between image versions, so an old ID may need checking against the old image specifically. Use immutable references for everything: a digest in place of a tag, a commit hash in place of a branch.

PartOften lives inReverted by undoing a Deployment?
Container imagePod templateYes
Value set directly in the Pod templatePod templateYes
Prompt fileConfigMap, or a prompt storeNo
Hosted model nameSecret, flag service or gatewayNo
Routing and fallback rulesGateway configurationNo
WeightsVolume or model storeOnly if the old copy still exists
Prompts and output contractVersioned with the applicationTools and parsersIncluding any routing or extraction callsModel and settingsExact ID, API version, effort or samplingEngine and templateImage digest, chat template, generation configEvidenceQuestion set and baseline resultsPrompts and output contractVersioned with the applicationTools and parsersIncluding any routing or extraction callsModel and settingsExact ID, API version, effort or samplingEngine and templateImage digest, chat template, generationconfigEvidenceQuestion set and baseline results
One release ID covers every layer. Restoring any single layer alone produces a combination that was never tested.

Triggers an on-call person can use

Under pressure, a vague instruction like roll back if the model seems worse produces a long debate while people receive unreliable answers. Write conditions someone can check, and name who decides. Keep the escalation route somewhere that does not depend on the affected application.

Separate the triggers that need no discussion from those that call for a decision. Any confirmed permission failure should mean an immediate return, without a meeting. A broken output contract is usually the same. A quality signal is slower and may need a person to confirm it: a jump in flagged answers, a rise in the rate at which independent checks disagree, or a failed scheduled run of the question set.

Signal duringrolloutChecked against therelease recordConfirmed permissionfailureRoll back nowNo approval neededContract broken orerror spikeRestore automaticallyThen notify the ownerLatency overobjectiveCut traffic shareRoll back if it persistsFlags or checkdisagreement risingOwner reviewsWithin an agreed windowSignal during rolloutChecked against the release recordConfirmed permission failureRoll back nowNo approval neededContract broken or error spikeRestore automaticallyThen notify the ownerLatency over objectiveCut traffic shareRoll back if it persistsFlags or check disagreement risingOwner reviewsWithin an agreed window
Decide this mapping before the rollout. Only the quality branch should need anyone’s judgment in the moment.

Rehearse with a real failure

Run the return in staging before the rollout. Put the candidate in place, trigger one of your conditions on purpose, and follow the written steps with the person who would be on call. Time it. Restore the baseline, and check it with a known question, comparing the answer and identity to the record of what was approved. A successful configuration command proves little, since it reports only that the command ran.

Rehearsals find unglamorous problems: a credential that expired, a fallback no one can reach, a cold start of 20 minutes on a large self-hosted model that makes an instant rollback impossible. That last one argues for keeping the old version warm during the canary, which costs money and sets a useful limit on how long the canary should run.

Clean up what the bad version made

Switching back stops new damage and repairs nothing. Tag every stored answer, scheduled output and proposed action with the release ID when it is created, so the affected set can be found with a query. Without that tag, you are reduced to guessing from timestamps, and the canary share makes those unreliable.

Then decide proportionately. Saved answers may need a marker or a regeneration, and scheduled reports that went out may need a correction sent to the people who received them. Queued work should be stopped or reviewed. Reversing an external action taken by a workflow is a separate business process that no model switch can perform, one more reason to gate actions separately and keep reliable audit evidence.

-- Invented table and columns; tag outputs when they are created
SELECT output_type,
       COUNT(*) AS outputs,
       COUNT(DISTINCT owner_id) AS people_affected,
       MIN(created_at) AS first_seen,
       MAX(created_at) AS last_seen
FROM   answer_log
WHERE  release_id = '2026-11-model-b'
GROUP  BY output_type;

Keep the failure, and tell the next team

After restoring, keep a controlled record of what happened and add a representative case to the question set, so the same failure blocks the next attempt. Don’t rewrite the baseline’s results to make the candidate look closer. Mark the candidate as rejected for that configuration, with the reason, so nobody retries it in a later cycle without knowing.

If you buy your AI analytics, ask your vendor the same questions about release evidence and returning to a previous state. In Nexatron, a flagged wrong answer goes to the data owner, and nothing changes until the owner approves a fix. Flags like these make a good quality signal as long as someone watches them during a rollout.

Claude is a trademark of Anthropic, PBC.

Bring three business questions

Explore your sources, definitions, and review criteria with our team. Please keep credentials and sensitive records out of the inquiry.