Model upgrades & deprecations

In one sentence

Hosted models retire on published schedules, so every model you ship is a future migration: pin versions, hide providers behind one interface, and move only through an eval-gated path of shadow, canary and rollback.

Analogy: Like a cloud provider retiring an OS image or a language runtime: the date is announced, the clock runs, and teams with good tests upgrade in a sprint while the rest scramble.

Every step can send you back; nothing reaches all users until it beats the pinned baseline offline, in shadow and on a canary.

How it works

  • A deprecated model still answers; a retired one returns errors, after as little as ~2 weeks' notice for previews.
  • Keep prompts versioned and portable, and a golden set that scores behavior, not just accuracy.
  • Run offline evals, then shadow traffic (users see the old model, you diff), then a 1–5% canary.
  • What breaks is rarely average quality but behavior drift: output format, verbosity, refusals, tool-call style.
  • Keep the old snapshot as rollback until it retires, and budget migrations as a recurring line item.

Check yourself

Answer to mark it learned; your answers aren't scored.

Nobody deployed anything, yet this week your extraction service's JSON parse failures doubled and answers got longer. The config says model: "<family>-latest". Most likely cause and fix?

Go deeper

Full explanation

Hosted models are products with an end-of-life date. A deprecated model still answers; a retired one returns errors. Anthropic gives ≥60 days' notice; OpenAI states ≥6 months for GA models but as little as ~2 weeks for previews (both policies as of Nov 2026). Every model you ship is a migration you will run.

Design for it from day one:

  • Pin snapshots (claude-sonnet-4-5-20250929, not an alias that moves under you) and send every call through one provider-agnostic interface, usually your LLM gateway, so a swap is a config change.
  • Keep prompts portable and versioned in Prompts as code: versioning, with a variant per model family when needed. Prefer schemas over parsing prose.
  • Keep a golden set (Golden datasets & test sets) that scores behavior, not just accuracy, and run it in Evals in CI/CD & release gates.

The playbook: offline eval on the golden set → prompt re-tuning → shadow traffic (both models answer, users see the old one, you diff) → canary at 1–5% → full rollout, keeping the old snapshot as rollback until it retires.

What breaks is rarely average quality. It's behavior drift: output format, verbosity, refusals, tool-call style, a sampling parameter the new model rejects. Budget migrations as a recurring line item: with several models in production and ~1–2 year lifecycles, something is always migrating.

Code Eval gate: candidate vs pinned baseline
pythonEval gate: candidate vs pinned baseline
from gateway import complete                 # your provider-agnostic client
from evals import load_golden, grade, summarize

BASELINE  = "claude-sonnet-4-5-20250929"     # pinned prod snapshot; retires 2026-11-30
CANDIDATE = "claude-sonnet-5-5"              # example replacement; never "-latest" in prod

# metric -> (which way is better, tolerated regression). Gate behavior, not just accuracy.
GATES = {
    "task_success":     ("higher", 0.01),    # may drop at most 1 point
    "json_valid":       ("higher", 0.0),     # format breaks are not tolerated
    "refusal_rate":     ("lower",  0.005),
    "tool_call_errors": ("lower",  0.0),
    "p95_output_toks":  ("lower",  0.15),    # relative: at most 15% more verbose
}

def run(model: str, prompt_version: str) -> dict:
    cases = load_golden("golden/v12.jsonl")             # same set, same graders
    outs = [complete(model, c.render(prompt_version)) for c in cases]
    return summarize([grade(c, o) for c, o in zip(cases, outs)])

def gate(base: dict, cand: dict) -> list[str]:
    fails = []
    for m, (better, tol) in GATES.items():
        delta = cand[m] - base[m]
        if m == "p95_output_toks":
            delta /= base[m]                            # relative change
        regression = -delta if better == "higher" else delta
        if regression > tol:
            fails.append(f"{m}: {base[m]:.3f} -> {cand[m]:.3f}")
    return fails

base = run(BASELINE, prompt_version="v7")
cand = run(CANDIDATE, prompt_version="v8")              # prompt re-tuned for the new model
print(gate(base, cand) or "PASS: start shadow traffic")
Real example

A ticket-triage pipeline pinned to one snapshot gets a 60-day retirement notice. Day 1: gateway logs show three features on that model. Week 1: on 1,500 golden cases the candidate gains 2 points of routing accuracy, but valid JSON drops from 99.7% to 97.9% (it wraps JSON in prose) and outputs run 30% longer. The team switches to schema-enforced structured outputs and trims the prompt; gates pass. Week 2: shadow on live traffic flags more refusals on billing disputes; a prompt fix closes it. Week 3: 5% canary, then 100%. The old snapshot stays configured as rollback until the retirement date. Cost: ~3 engineer-weeks, now a line in every quarter's plan.

Trade-offs +3 · −3

+ You gain

  • Turns a forced, dated event into a routine, low-risk deploy.
  • Each migration is a chance to re-check cost: you can move down a tier, not just sideways.
  • One provider-agnostic interface gives you fallbacks during outages and leverage in pricing talks.

− You pay

  • A recurring cost: eval runs, prompt re-tuning and engineer-weeks every quarter.
  • Abstraction can flatten provider-specific features such as caching, tool formats and reasoning controls.
  • A stale golden set approves bad migrations with full confidence.

Use it when

Any production feature on a hosted model. Assume a forced migration within ~1–2 years and build the pins, gateway and golden set before the first notice arrives.

Avoid it when

Throwaway prototypes can track the latest alias and accept breakage. Self-hosted open weights never retire on you, but you still run the same playbook when you choose to upgrade.

Numbers to know 5
  • Anthropic: ≥60 days' notice before retiring a public model; Claude Sonnet 4.5 was deprecated Sep 30, 2026 and retires Nov 30, 2026.
  • OpenAI's stated minimums (2026): ≥6 months for GA models, ≥3 months for specialized variants, as little as ~2 weeks for previews.
  • Recent Claude snapshots were retired ~1–2 years after release (Sonnet 3.7: Feb 2025 → Feb 2026).
  • Same name, different behavior: GPT-4's prime-number accuracy went from 84% (March 2023) to 51% (June 2023) in Chen et al.
  • Rule of thumb: shadow for ≥1 week and canary at 1–5% for days, so weekly traffic patterns show up.
Common pitfalls 4
  • Floating aliases (-latest) in production: behavior changes without a deploy and your evals describe a model you no longer run.
  • Forgetting fine-tunes: OpenAI's fine-tuned models follow their base model's shutdown schedule (policy as of Nov 2026), so the re-train is part of the migration.
  • Hard-coded sampling params: Claude 4.7 and later return a 400 on a non-default temperature, top_p or top_k.
  • Gating only on average accuracy: format, refusal and verbosity regressions hide behind a flat score. Gate per slice and per behavior.
Interview questions 3

Answer out loud first, then reveal.

Your production model retires in 60 days. Walk me through the migration.Show answer

Day one, I inventory usage from gateway logs: which features, prompts and fine-tunes depend on it. Then I pick one or two candidates and run the golden set offline with gates on quality and behavior: format validity, refusals, verbosity, tool-call errors, cost and latency. I re-tune prompts per model until the gates pass, shadow real traffic for a week and diff outputs. Then a 5% canary with online metrics and a flag to roll back instantly, then ramp. The old snapshot stays wired as rollback until the retirement date, and I write down what drifted so the next migration is faster.

How do you architect so that model migrations are cheap?Show answer

Four things. Model ids are config, pinned to snapshots, behind a gateway with one internal API, so a swap is a flag, not a refactor. Prompts are versioned artifacts with per-family variants. Outputs go through schemas and validators instead of parsing prose, which removes most format drift. And a golden set with behavior metrics runs in CI against every candidate the week it launches, not the week before retirement. The trade-off: a lowest-common-denominator interface loses provider features, so I allow them behind adapters when they pay for themselves, like prompt caching.

A new model launches and tops the benchmarks. Do you upgrade?Show answer

Not because of benchmarks. I run it through my golden set the week it launches, because public benchmarks don't measure my format, my refusal boundaries or my tool schemas. If it wins on my evals for quality, cost or latency, I start the normal shadow-and-canary path; if not, I keep the pinned model and re-check later. Either way, evaluating early buys runway: when the deprecation notice arrives, the migration is already half done.