In the overview, you saw the August rush ahead of the Ridgeline Huts assistant: heavy traffic, a provider that times out, and a half-spent budget. Every fix in this course is measured before and after, which only means something if the model holds still. A model that changes under you is a production failure in its own right, with no deploy to blame.
In this lesson, you’ll audit the model each role asks for, record when each model can retire, and write a script that finds when the answering model changed. Start by getting the assistant running.
Run the Starting Project
The code download below the overview video holds the assistant as Observing AI Features left it. Open its starting-project folder and run npm install. Then copy in your previous .env, or copy .env.example to .env and add your provider and key. Start the server:
$ npm start
In a second terminal, start the traffic simulator, which replays July’s recorded hiker questions against /ask and spends tokens with your provider:
$ npm run traffic -- --month=july
Press Ctrl+C after a few dozen questions. Each model span in today’s traces/ file names request.model, the ID your code asked for, and model, the one that answered. Later lessons use the simulator’s new options: --timeouts for a provider that times out now and then, --outage for a full outage, and --spent for a half-spent budget.
Audit the Model Register
Every role gets its model from model/config.js, the model register. Features ask for a role, such as models.answer, and don’t name a model ID, so you make and change each model choice in one place. As Evals You Can Trust showed, a snapshot is a fixed model version, dated or not, that holds still until it retires. An alias is a name the provider can point at a newer snapshot. Here’s the register the download ships with:
model/config.js
const MODELS = {
openai: {
answer: "gpt-5.4-mini-2026-03-17",
fast: "gpt-6-luna",
judge: "gpt-6.1-terra",
},
anthropic: {
answer: "claude-sonnet-5-5",
fast: "claude-haiku-5-5",
judge: "claude-opus-4-6",
},
};
export const models = MODELS[process.env.MODEL_PROVIDER];
Aliases do move. gpt-4o pointed at gpt-4o-2024-05-13 until October 2, 2024, and then at gpt-4o-2024-08-06, though no customer changed anything.
The answer role is pinned already. Check the other two roles on your provider’s model pages, which list snapshots, and on its deprecations page, which gives retirement dates. Then record what you found and when you checked:
The undated fast and judge IDs are pinned already. The model page for gpt-6-luna and the one for gpt-6.1-terra list each under Snapshots, and gpt-6-luna answered as itself on December 2, 2026. The deprecations page listed none of the three as deprecated:
model/config.js
// OpenAI's deprecations page, checked 2026-12-02:
// None of these three is deprecated.
openai: {
answer: "gpt-5.4-mini-2026-03-17",
fast: "gpt-6-luna", // A snapshot, per its page
judge: "gpt-6.1-terra", // A snapshot, per its page
},
From the Claude 4.6 generation on, every Anthropic model ID is a pinned snapshot, as the models overview shows. The register doesn’t yet say when the models can retire. The deprecations page gives each model’s earliest retirement date, and Anthropic gives at least sixty days’ notice before calls return 404:
model/config.js
// Anthropic's deprecations page, checked 2026-12-02:
// Earliest retirement dates.
anthropic: {
answer: "claude-sonnet-5-5", // Not before 2027-09-28
fast: "claude-haiku-5-5", // Not before 2027-10-07
judge: "claude-opus-4-6", // Not before 2027-02-05
},
The judge’s date is the earliest. A new judge shifts every pass rate this course measures, so when the current judge’s retirement notice arrives, move the judge in a change of its own and check it against labeled cases.
Pinning has a cost too. An alias brings the provider’s improvements for free but can change behavior under your evals. A snapshot holds still, but you have to schedule each upgrade before it retires. Pin anything with an eval baseline or users relying on it. If a new role’s choice still feels like a judgment call, talk it through:
Find the Day the Model Changed
Your traces record the model each response names, so a short script can list every change. Create scripts/model-changes.js:
scripts/model-changes.js
import { readFile } from "node:fs/promises";
const text = await readFile(process.argv[2], "utf8");
const calls = text.split("\n")
.filter((line) => line.trim() !== "")
.map((line) => JSON.parse(line))
.filter((s) => s.name === "model" && s.model)
.toSorted((a, b) => a.start.localeCompare(b.start));
Spans are written when they end, so .toSorted() restores start order. Below that, add a loop that keeps the last answering model per requested ID in a Map, since your code requests several models:
scripts/model-changes.js
const answering = new Map();
for (const { start, request, model } of calls) {
if (answering.get(request.model) !== model) {
console.log(`${start} ${request.model} -> ${model}`);
answering.set(request.model, model);
}
}
const models = new Set(calls.map((s) => s.model));
console.log(`${calls.length} calls, ${models.size} models`);
The download’s recorded/traces-2024-10-02.jsonl holds a simulated day of traffic around a real alias move. Run the script on it:
$ node scripts/model-changes.js recorded/traces-2024-10-02.jsonl
2024-10-02T06:02:47.323Z gpt-4o -> gpt-4o-2024-05-13
2024-10-02T12:01:09.731Z gpt-4o -> gpt-4o-2024-08-06
347 calls, 2 models
The first line is the day’s first call. The second line is the move. From 12:01 UTC, the same request for gpt-4o got a different snapshot.
Your number for this lesson is two answering models in one day, with no change to code or config. The move is real, while the traffic and the move’s 12:01 time are simulated. During a real move, both snapshots can answer for a while, and the script prints alternating lines. Those lines tell you the same thing: your comparisons now mix models.
To check your own pins, run the simulator briefly, then run the script on today’s traces/ file. Each requested ID should print one line.
A team runs the script daily and seeds its Map with the previous day’s last answering models instead of starting empty. Then a change behind a pinned ID is worth paging someone, and a change behind an alias means rerunning the evals. The script sees only the IDs that responses report, so you still need evals and provider notices to catch changes behind an unchanged ID.
If the script reports a change nobody made, ask the mentor what to check first, and expect a short exchange:
Check Your Understanding
Try these before you reveal the answers:
- With every role pinned, why should the traces still record the model the response names?
- A teammate’s version of the script compares
request.modelinstead ofmodel. What does it print on the recorded day? - The wardens want a feature that translates questions into English. Where does its model go, and what do you record with it?
- A pin fixes the ID you send, not what answers. The trace records what answered each call, whatever the register said then, so you can date any change, yours or the provider’s.
- It reports one model for the whole day, because every request named the same alias. The move at noon never shows.
- It goes in a new role in each provider’s block of
model/config.js, pinned to a snapshot. Next to the model ID, record its earliest retirement date and the date of your check. The translation feature then asks for that role and never names the model ID.
A pin can’t outlast its model, because every snapshot eventually retires. In the next lesson, Upgrade the Model With Evals, you’ll move a role to a newer model as a tested change.