Your model is a dependency: give it a lockfile

César Soto Valero applies six supply-chain habits (pin, test, inventory, debloat, verify, exit) to LLM calls, for teams running models in production.

Say you're the one developer on a five-person operations team at a property-management firm. A year ago you built a lease-abstraction script in an evening: each PDF goes to claude-sonnet-4-5 with temperature=0, the model returns rent, term and renewal dates as JSON, and the rows land in a shared spreadsheet. Since then you've edited the prompt in place a dozen times, a colleague wired a second script to a different model, and nobody wrote down which. Then the deprecation email arrives. You don't know how many scripts are affected, you never saved what "correct" looked like, and you can't tell whether the replacement is better or just different.

César Soto Valero's fix is to manage that model call the way you already manage a library. His post, published Nov 26, 2026, ports six habits from the software supply chain (pin, test, inventory, debloat, verify and exit) onto LLM pipelines, with Python and YAML you can adapt.

What it is

Soto Valero, who studied dependency bloat during his PhD at KTH, calls the model the strangest dependency we've adopted: no source code, no semantic versioning, and a retirement date. He lists the ways it misbehaves where a library wouldn't. Researchers tracking GPT-4 saw its accuracy at identifying prime numbers fall from 84% in March 2023 to 51% in June 2023 under the same name. Between August and early September 2025, three infrastructure bugs degraded some Claude responses while the weights and model ID stayed the same. Thinking Machines sent one prompt 1,000 times at temperature zero and got 80 distinct completions, because GPU kernels don't return bit-identical results across batch sizes. His summary: "Temperature zero is not a lockfile."

The habits, mapped to the lease script:

For the testing habit, you don't have to build every piece yourself:

Who it's for

Pick this up if an LLM call runs unattended inside something other people depend on: a pipeline, an internal tool, a client deliverable. The case is strongest in regulated shops. Boston Consulting Group's 2026 benchmark of 26 systemically important banks found fewer than half have a centralized, tool-based AI inventory, and 46% reported an AI-related issue or incident in the past 12 months. Soto Valero ties the inventory to the EU's Digital Operational Resilience Act (DORA), which requires a register of third-party ICT contracts and documented, tested exit strategies for services that support critical functions.

The other core reader is the person whose evening project became something the team relies on. These habits are how a vibe-coded script becomes one you can prove still works after a model change.

Skip the full kit if you call one hosted model from one script and read every output yourself. Pin the ID and add the retirement check below; at that size the lockfile, AI-BOM and statistical gate cost more than they save. Skip habit 5 if you only use hosted APIs: it applies to open-weight models you download.

Before and after

Before:

  1. The model is named by alias in a config file or environment variable.
  2. The prompt is edited in place, with no record of what changed or why.
  3. The retirement email arrives, and you grep the codebase and hope.
  4. You swap the model string, eyeball a few outputs and ship.
  5. Users tell you which cases broke.

After, following the post's pipeline:

  1. ai-lock.yaml pins the snapshot, prompt hash, schema hash, tool definitions, embedding model and fallback.
  2. CI runs verify_lock. An edited prompt fails as "changed without a release"; a changed tool definition fails as "unpinned, or changed since approval"; a model within 90 days of retirement fails the build.
  3. The candidate snapshot runs on the gold set, five runs per item, and the gate returns pass, review, or reject with the regressions listed by name.
  4. A shadow run on live traffic compares outputs without using them, then a canary runs with full human review, then the candidate is promoted.
  5. The AI-BOM is regenerated from the lockfile, so the next "where do we use it?" is a function call.
  6. A daily probe feeding a control chart watches for serving-stack changes under the pinned model.

Try it

Run a model inventory and a retirement check on one repository. You need a shell, and for the OpenAI check, Python with the openai package and an API key.

  1. Find every model ID. EvalShift's guide gives this grep, and says to read every hit, including the eval harness, where judge and embedding models are easy to forget:
grep -rhoE "\b(gpt-[a-z0-9][a-z0-9.-]*|chatgpt-[a-z0-9.-]+|o[134](-[a-z0-9-]+)?|claude-[a-z0-9.-]+|gemini-[a-z0-9.-]+|text-embedding-[a-z0-9-]+|tts-1(-hd)?|whisper-1|codex-mini[a-z-]*)\b" \
  --exclude-dir={node_modules,.git,.venv,dist} . | sort | uniq -c | sort -rn
  1. If you call the Claude API, cross-check against real traffic: Anthropic's deprecations page says to open the Usage page in Claude Console, click Export, and review the CSV, which breaks usage down by API key and model.
  2. Look up each ID on the platform you actually call it through. Anthropic's dates cover its own platforms; Amazon Bedrock and Google-managed Claude on Google Cloud set their own schedules. Note that claude-sonnet-4-5-20250929 retires from the Claude API on Nov 30, 2026, and that retirement includes the dateless claude-sonnet-4-5 alias, per the same page.
  3. For OpenAI IDs, run the CI check from EvalShift's guide with your IDs in PINNED:
import sys
from datetime import date, timedelta
from openai import OpenAI

PINNED = {"gpt-4o-2024-08-06", "gpt-5-mini"}  # every model ID your code calls
horizon = (date.today() + timedelta(days=90)).isoformat()

models = {m.id: getattr(m, "shutdown_date", None) for m in OpenAI().models.list()}
problems = [f"{m}: not available" for m in PINNED if m not in models]
problems += [f"{m}: shuts down {models[m]}" for m in PINNED if models.get(m) and models[m] <= horizon]

print("\n".join(problems) or "no pinned model shuts down in the next 90 days")
sys.exit(1 if problems else 0)

You'll know it worked when it prints "no pinned model shuts down in the next 90 days" and exits 0, or lists each problem ID and exits 1. That exit code is what fails a CI job.

  1. Replace every alias you found with a pinned snapshot, and start a lockfile with the fields from Soto Valero's ai-lock.yaml.
  2. Tell your coding agent. Our example, for a CLAUDE.md or rules file: "Never call a model by an alias. Every model ID, prompt file and tool you add must be listed in ai-lock.yaml. Editing a prompt is a release: update its hash in the lockfile in the same commit and say why in the commit message."

Next, build a gold set from real inputs and add the post's paired gate:

from scipy.stats import binomtest

def upgrade_gate(old_ok: dict[str, bool], new_ok: dict[str, bool], alpha: float = 0.05) -> dict:
    """Paired comparison of two model versions on the same gold items.

    old_ok[item] is True if the current version handles the item correctly
    (for example, in at least 4 of 5 runs). Only items where the two versions
    disagree carry information, which is the idea behind McNemar's test.
    """
    items = old_ok.keys() & new_ok.keys()
    regressions = sorted(i for i in items if old_ok[i] and not new_ok[i])
    fixes = sorted(i for i in items if new_ok[i] and not old_ok[i])
    flips = len(regressions) + len(fixes)
    p_worse = binomtest(len(regressions), flips, 0.5, alternative="greater").pvalue if flips else 1.0

    if p_worse < alpha:
        decision = "reject"
    elif regressions:
        decision = "review the regressions"  # a net gain can still break what worked
    else:
        decision = "pass"
    return {"decision": decision, "fixes": len(fixes), "regressions": regressions, "p_worse": p_worse}

If you'd rather not hand-roll the runner that produces old_ok and new_ok, Promptfoo's getting-started guide sets up a model comparison with npx promptfoo@latest init --example getting-started.

Where it breaks

Pinning doesn't freeze what you can't see. The post itself says you can pin the name but not the computation: the 2025 Claude bugs happened behind an unchanged ID, and Anthropic's own evaluations didn't catch them at first. The daily probe it proposes catches drift after it starts. The Obligra post, which says it was generated by an AI agent and promotes Obligra Verify, adds that a call record doesn't independently prove which weights ran.

The example lockfile pins temperature: 0 for a generic provider. On Claude, Anthropic's deprecations page says temperature, top_p and top_k were removed in API version 2026-10-21 and return a 400 error, and earlier API versions return it for non-default values on Claude 4.7 and later. EvalShift notes that moving a Sonnet 4.5 call that sets temperature=0 to Sonnet 5.5 fails on the first request. The params block has to follow each provider's rules.

Retirement dates depend on where you call the model. The same guide lists Claude Sonnet 4.5 on Bedrock until April 8, 2027, months after its Nov 30 retirement on the Claude API, so a catalog keyed by model name alone will be wrong somewhere. Some migrations never fail at all. Per EvalShift's summary of Google's documentation, from Dec 1, 2026 the Gemini API answers gemini-2.5-pro requests with gemini-3.8-flash. EvalShift also reads Microsoft's Azure OpenAI policy as upgrading Standard deployments automatically at retirement, unless a deployment is set to NoAutoUpgrade. A check that reads only your config won't see either; log the model each response reports.

Notice periods are thinner than they look. Anthropic commits to at least 60 days for publicly released models. EvalShift counted 2026 notices ranging from 20 days to six months across providers; its author founded EvalShift, the page promotes his migration tool, and he says providers revise these pages often, so check the provider page before acting on a date (his were read Nov 6 and Nov 25, 2026).

The gate has a cost. Five runs per gold item means five times the API calls per candidate, and a small gold set yields few disagreements, so in our reading of the code "review the regressions" will be the usual verdict and someone still has to read them.

Soto Valero says his AI-BOM validates against the CycloneDX 1.7 schema; we haven't run it through a validator, and the sources here describe a hand-built BOM, not a dedicated inventory or gateway product. The catalog that verify_lock reads is your own registry, built from the providers' model and deprecation pages, so the 90-day alarm is only as current as the last time someone re-read those pages.

Sources