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:
- Pin the whole closure. The model ID becomes one line of an
ai-lock.yamlthat also records region, sampling parameters, a SHA-256 of the prompt file and output schema, a hash of each tool's name, description and input schema, the embedding model and a fallback. Averify_lockfunction checks it in CI and at startup, and fails the build 90 days before a pinned model retires. That covers the prompt you edited in place: in a study the post cites of 1,262 prompt changes across 243 open-source repositories, only 21.9% were documented in commit messages. Know your provider's naming, too. For Anthropic models before the 4.6 generation, the dated ID is the snapshot and the short name is a moving alias; from 4.6 on, the dateless ID is itself pinned (Obligra on DEV Community reads Anthropic's versioning page the same way). - Test every upgrade statistically. Run each gold item several times (the example uses five, scoring "correct in at least 4 of 5 runs") and compare old and new versions on the same items. Only the items where they disagree carry information, so the gate is an exact McNemar test. A snapshot that fixes 40 items and breaks 12 isn't rejected, but the 12 come back by name for review; at 10 fixes and 30 regressions, the gate rejects.
- Keep an AI bill of materials (AI-BOM). A CycloneDX document generated from the lockfile for each release, plus a
who_usesfunction that answers "which systems use model X at version Y?" That is the question your colleague's second script made unanswerable. - Debloat the agent. Anthropic reported that five MCP servers with 58 tools consumed about 55,000 tokens before a conversation started, and that letting the model search for tools cut token use by 85%, per the post. Log every tool call and remove the ones never used.
- Verify what you load. For open-weight models: download by commit SHA, allow only safetensors and JSON files, and check digests against the pin.
- Plan the exit. A thin provider abstraction, a fallback that passes the same gate, and drills that run the fallback in shadow mode. The embedding model is the stickiest piece: switching it means re-embedding the whole corpus.
For the testing habit, you don't have to build every piece yourself:
- Promptfoo: an MIT-licensed CLI and library for evals and red-teaming that runs evals locally and compares models side by side; it is now part of OpenAI.
- DeepEval: evals as pytest tests with 50+ metrics, almost all graded by an LLM judge, per EvalShift's comparison, so each judged check costs a model call per case. The same comparison says neither tool tests whether one model beats another by more than chance, which is the gap Soto Valero's paired gate fills.
- EvalShift: records production runs through wrapped OpenAI, Anthropic and google-genai clients and replays them against the replacement; its deprecation guide is written by EvalShift's founder, who discloses it.
- OpenAI hosted Evals: went read-only on October 31 and shuts down Nov 30, 2026, according to that same EvalShift guide, so tests living there need a migration of their own.
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:
- The model is named by alias in a config file or environment variable.
- The prompt is edited in place, with no record of what changed or why.
- The retirement email arrives, and you grep the codebase and hope.
- You swap the model string, eyeball a few outputs and ship.
- Users tell you which cases broke.
After, following the post's pipeline:
ai-lock.yamlpins the snapshot, prompt hash, schema hash, tool definitions, embedding model and fallback.- 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. - 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.
- A shadow run on live traffic compares outputs without using them, then a canary runs with full human review, then the candidate is promoted.
- The AI-BOM is regenerated from the lockfile, so the next "where do we use it?" is a function call.
- 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.
- 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
- 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.
- 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-20250929retires from the Claude API on Nov 30, 2026, and that retirement includes the datelessclaude-sonnet-4-5alias, per the same page. - 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.
- Replace every alias you found with a pinned snapshot, and start a lockfile with the fields from Soto Valero's
ai-lock.yaml. - 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
- Your Model Is a Dependency · César Soto Valero
- Model deprecations · Claude Platform Docs
- LLM model deprecation schedule 2026: OpenAI, Anthropic, Google · EvalShift
- Operationalizing AI Governance Gives Banks an Advantage in Scaling AI · Cision PR Newswire
- Pin the Model, Record What Ran: Version Discipline for LLM Calls · DEV Community
- Getting started | Promptfoo · promptfoo.dev
- GitHub - promptfoo/promptfoo: Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more. Simple declarative configs with command line and CI/CD integration. Used by OpenAI and Anthropic. · GitHub
- Promptfoo vs DeepEval: which LLM eval framework to use in 2026 · EvalShift