Blog · · 10 min read

LLM model deprecation migration: move product agents off a retiring model without breaking tenant model selections, live sessions, or automations

LLM model deprecation migration: move product agents off a retiring model without breaking tenant model selections, live sessions, or automations

Your provider emails a retirement notice for the model your product agent runs on. The engineering fix looks small: change a constant, run the eval suite, deploy. Then the shutdown date arrives and a tenant's nightly automation fails, a customer's long-running thread returns a 400, and an Azure deployment you never touched starts answering with a different model generation. A code-only LLM model deprecation migration misses every place where a model ID lives in product data or provider state. This guide shows how to find those places, decide what each tenant's agent moves to, cut live sessions over safely, and make a retired route fail loudly instead of looping on retries.

The short answer: migrate routes, references, and sessions

Generic runbooks already cover the code side well. Microsoft's model migration guide walks through six phases from discovery to retirement, and independent guides from OpenNash and agentpatterns.ai cover call-site inventory, snapshot pinning, and eval gates. A product agent needs eight more pieces on top of that:

  1. A retirement record per route, not per model name, alerting on the earliest date of any route you use.
  2. An inventory of model references in product storage: agent configs, tenant overrides, automations, session overrides, judges, and eval baselines.
  3. An explicit upgrade policy on every managed deployment.
  4. A successor decision per tenant: apply automatically, apply with notice, or wait for approval.
  5. A cutover rule for live conversations that respects pending tool calls and provider-stored reasoning.
  6. A typed, non-retryable failure for retired routes, with copy a tenant can act on.
  7. A substitution rule that never leaves the tenant's allowed model pool.
  8. A staging drill that replays the provider's real retired-route error before the shutdown date.

Why model retirement breaks product agents

Retirement is a routine calendar event. OpenAI's deprecations page publishes minimum notice periods that differ by model class, about six months for generally available models, three months for specialized variants, and as little as two weeks for previews, along with dated shutdown batches. Anthropic's model deprecations page commits to at least 60 days of notice for publicly released models and lists retirement dates, for example claude-sonnet-4-5-20250929 on 2026-11-30. Microsoft's Foundry lifecycle policy sets retirement for generally available models 18 months after launch and states that after retirement every inference request returns 410 Gone. Microsoft's migration guide also notes that retirement dates cannot be extended.

Runbooks already cover that part. Product agents break because of where they keep model choices.

Model IDs live in product data

A product that lets operators or tenants choose a model per agent stores that choice in a database row. A scheduled automation stores its own model override. A user who switched models mid-conversation leaves a session-level override behind. An evaluation baseline or LLM judge records the model it was calibrated against. A code search finds none of these.

The OpenClaw project hit exactly this failure. Its merged pull request #139523 describes unattended automations that kept failing because their persisted model had been retired, and the fix repairs retired references across defaults, per-agent selectors, cron overrides, fallback lists, and session overrides. Copy two design choices from that fix. The repair never widens model policy, so a replacement must already be allowed for that agent. And absence from a model catalog is not treated as proof of retirement, because a catalog can be incomplete or temporarily stale.

A retired route looks like a transient error

When the provider rejects a retired model, the error often lands in a generic handler. OpenClaw's #97611 replaced copy that told users to try again or start a new session, a message that could never succeed for a bad model ID, with a reply keyed on a typed model-unavailable reason. An earlier practitioner report, #4992, describes an embedded agent that hung indefinitely when a retired Gemini model returned a 404 that the runtime did not classify. Retry loops and generic "something went wrong" messages turn a scheduled, announced change into an open-ended outage.

Provider-stored state is tied to the model

If your agent chains turns with stored responses, the conversation is not portable across models. In an OpenAI Developer Community thread, a practitioner reproduces a 400 error when continuing a previous_response_id chain on a different model, and another participant reports that reasoning items are only accepted by the model that generated them. That is a practitioner report rather than a documented guarantee. Plan for it anyway, because a live thread switched to the successor model can fail on its next turn.

Implement the LLM model deprecation migration

Track retirement per route

Retirement belongs to a route, not a model name, so track the earliest retirement date on every route the product actually calls. Anthropic notes that partner platforms such as Amazon Bedrock and Google Cloud set their own retirement schedules for Claude models (Anthropic). Microsoft's lifecycle page says the Models API exposes lifecycleStatus and a per-SKU deprecationDate, and warns that API terms can differ from the dates shown in the portal (Microsoft Learn). OpenClaw's #97611 dealt with a model that disappeared on one account route while it remained available elsewhere. So the same model string can have several dates.

Key your retirement record on the full route and alert from the earliest date of any route the product calls:

route_key        = provider + platform + region + deployment_type + account
model_ref        = vendor model id or dated snapshot
lifecycle_state  = active | deprecated | legacy | retired   (as reported per route)
retirement_date  = earliest published date for this route
source           = API field or deprecation page, with fetched_at
successor        = provider-declared replacement, if any
alert_at         = retirement_date minus your lead time

Pull these values from provider APIs where they exist and from the deprecation pages otherwise. Store the source and fetch time so an operator can see why an alert fired.

Inventory references in storage

Model IDs persisted in product data and provider-stored reasoning state are invisible to a code search, so inventory storage as well as code and move live threads only at a turn boundary with no pending tool call. Before choosing a successor, list every place a model reference can live. For a typical product agent that means:

  • Agent configuration rows, including separate fields for routing, simple, and complex models if your agent splits work by tier.
  • Tenant-level overrides and allowed model pools.
  • Scheduled automations, workflows, and background jobs with their own model setting.
  • Session or conversation overrides chosen by end users.
  • Fallback chains, eval baselines, golden sets, and judge configurations.
  • Embedding model settings for knowledge indexes, which need a re-index plan rather than a string swap, as OpenNash points out.

Run a query against each store that groups references by model and route, then join the result to the retirement record. The output is the real blast radius, showing which tenants, automations, and sessions break on which date. The storage list above combines the OpenClaw repair surfaces with the generic code-side inventory and extends both to the product data where tenants make their choices, so treat it as a recommendation rather than a provider requirement.

Set the upgrade policy explicitly

On Azure, the deployment property versionUpgradeOption decides what happens at retirement. Microsoft's working with models page states that a null value is equivalent to OnceCurrentVersionExpired, which upgrades the deployment to the current default version when the old one expires, and that a NoAutoUpgrade deployment stops working at the retirement date. The lifecycle page adds that Standard deployments are upgraded region by region, while provisioned deployments are not upgraded automatically.

In practice, an unset field is a decision nobody made. An Azure deployment with no explicit upgrade policy is moved to the current default version at retirement, so set the policy on every managed deployment instead of accepting a silent model change. Your evals ran against one model, and after the retirement date the same deployment name serves another, possibly from a newer generation with different tool-calling behavior. Choose the policy per deployment on purpose:

Deployment situationRecommended policyReason
Tenant-facing agent with eval gatesNoAutoUpgrade plus your own aliasYou control when the model changes and can test first
Internal or low-risk utility callOnceNewDefaultVersionAvailable or OnceCurrentVersionExpired, set explicitlyAccepts provider upgrades knowingly
Provisioned capacityPlan a manual migrationNot upgraded automatically, so it fails at retirement
Field left nullNot allowedBehaves as OnceCurrentVersionExpired without anyone deciding

TrueFoundry describes the alias approach as a virtual model at the gateway with sticky canary routing. Whichever layer owns the alias, record the resolved model on every call so traces show what actually ran.

Decide the successor per tenant

A provider-declared successor is only a suggestion as far as your tenants are concerned. Some customers contractually limit which models may process their data, and some have tuned prompts against a specific model. Give each tenant one of three modes:

  • Auto: apply the successor once it passes your eval gate, then notify.
  • Notify: announce the change with a date and apply it unless the tenant objects.
  • Approve: keep the current model until retirement and require an explicit choice.

Whatever the mode, the successor must already be inside the tenant's allowed model pool. If it is not, the migration waits for a human decision. This mirrors the OpenClaw rule that a repair must not widen model policy.

Handle failure and recovery

Cut live sessions over at turn boundaries

Migrating stored references does not move a conversation that is mid-flight. Apply the new model only at a turn boundary where no tool call is pending, so a tool result is never sent to a model that did not request it. If the thread uses provider-stored state such as a previous_response_id chain, start the successor's first turn from your own transcript instead: rebuild the input from user and assistant messages and tool results, and drop provider reasoning items, which the practitioner thread above reports are accepted only by the model that produced them. Keep the old model serving existing threads until each reaches a boundary or the retirement date, whichever comes first.

Return a typed failure for retired routes

Classify a retired route before you send an inference request, using the retirement record, and classify provider responses such as 410 Gone, 404, or a model_not_found code as permanent. A permanent failure must not enter the retry or failover path built for transient outages, because retrying cannot fix it and failover to an arbitrary model can break the tenant's policy. Return a typed reason, show tenant-actionable copy ("This agent's model was retired on 2026-11-30. An admin can choose a replacement in agent settings."), and alert the owning operator with the route and affected automations.

Substitute only inside policy

If an automation must keep running, substitution is acceptable only when the tenant's mode allows it and the replacement sits inside its allowed pool. Log the substitution on the run with both model IDs. When no allowed replacement exists, pause the automation with a clear status instead of letting it fail every night.

Verify the solution

Run these checks before each provider shutdown date:

  • Every model reference in product storage, including automations, session overrides, fallbacks, and judges, appears in the inventory with a route and an earliest retirement date.
  • No managed deployment has a null upgrade policy.
  • A staging fixture that returns the provider's real retired-route response produces a typed, non-retryable failure before inference, with no retry loop and no hang.
  • A substitution attempt that would select a model outside the tenant's pool is rejected in a unit test.
  • A thread with a pending tool call is never moved to a different model, and a thread with stored reasoning resumes on the successor from a rebuilt transcript.
  • Traces record the resolved model for every call, so post-cutover regressions can be tied to the change. Arthur recommends trace-driven inventory and regression suites for the same reason.

Schedule the drill early enough that a failed check still leaves time inside the notice window, which can be as short as a couple of weeks for preview models.

Common mistakes

  • Treating catalog absence as retirement. A model missing from one listing may still be live on another route. Use published lifecycle data, as the OpenClaw repair does.
  • Using one global date. The earliest route date is the one that breaks you, and partner platforms publish their own.
  • Relying on floating aliases for tenant-facing agents. An alias that a provider repoints changes behavior without an eval run. Pin a dated snapshot behind your own alias.
  • Re-teaching the model at cutover. Prompt and tool definitions often need adjustment for a new model. Microsoft's migration guide notes that for agent workloads the tool-definition and schema work tends to dominate, so budget for it.

What to do next

Pick the next retirement date on any provider route your product uses and run the storage inventory query against it this week. List every tenant config, automation, and session override that references the retiring model, set an explicit upgrade policy on each affected deployment, and add a staging fixture that returns the provider's retired-route error so your LLM model deprecation migration is tested before the date arrives.

Be first in line.

Join the waitlist and we'll email you the moment it's ready. No sales call.

Try the demo →
or talk to us