◉CLAUDE LABJP
●CC 2.1.332 — 2.1.332 (11/25) is still current. Skills from MCP servers appear as server:skill (beta)●OPUS 4.5 — Opus 4.5 is now scheduled to retire from the Claude API on 2027/1/22. Move to claude-opus-5-5●SONNET 4.5 — Sonnet 4.5 retires from the Claude API tomorrow, 11/30. Last day to check for hard-coded IDs●DISK — Users on Windows report Cowork's session disk filling up with no way to clean it●NEW — New: Asking Cowork for a meeting draft? Hand over old minutes after the outline is set●JETBRAINS — Our guide to using Claude with JetBrains IDEs is still among the most-read pages●CC 2.1.332 — 2.1.332 (11/25) is still current. Skills from MCP servers appear as server:skill (beta)●OPUS 4.5 — Opus 4.5 is now scheduled to retire from the Claude API on 2027/1/22. Move to claude-opus-5-5●SONNET 4.5 — Sonnet 4.5 retires from the Claude API tomorrow, 11/30. Last day to check for hard-coded IDs●DISK — Users on Windows report Cowork's session disk filling up with no way to clean it●NEW — New: Asking Cowork for a meeting draft? Hand over old minutes after the outline is set●JETBRAINS — Our guide to using Claude with JetBrains IDEs is still among the most-read pages
Articles/API & SDK
⬡ API & SDK/2026-08-30Advanced

Read the Catalog Your CLI Already Ships Before Bulk-Replacing Model IDs

A newer generation makes older model IDs look stale. Here is how to pull the catalog embedded in your installed binary, sort every reference into matched, date-mismatched, and malformed, and stop the replacement that would break working IDs.

Claude API149model IDsmigration14auditingoperations33

✦ Premium Article

A few nights after Opus 5 started showing up as the newest model, I was reviewing my own site and stopped mid-scroll. The claude-sonnet-4-6 and claude-opus-4-6 strings scattered through my articles suddenly looked like leftovers.

It seemed like a one-line sed job. I got as far as counting the targets: 209 Japanese articles, 56 of them still indexed. My finger was on the command when I noticed the thing I had not verified.

Were those 4-6 IDs actually invalid?

Had I replaced them without checking, I would have stripped a still-working identifier out of 56 articles and handed readers code that no longer runs. Working as a solo indie developer, that flavor of well-intentioned damage is the one I fear most, because nobody else is going to catch it.

The short version: the Claude Code binary already installed on your machine carries a catalog of the model IDs that version knows about. You can read it without a network call and without an API key. What follows is how to pull it, reconcile it against your own files, and stop the replacement before it lands.

A new generation appearing is not the same event as an ID being retired

Conflating those two is exactly what nearly cost me.

A new generation means the set of options grew. A retirement means requests that used to succeed will start failing, and that normally arrives with an announcement and a date. The first does not imply the second.

The catalog I pulled from v2.1.246 contained claude-opus-4, claude-opus-4-1, claude-opus-4-5, claude-opus-4-6, claude-opus-4-7, claude-opus-4-8, and claude-opus-5 at the same time. Generations show up as a list of things that coexist, not as a history of replacements.

The habit of reading "newest released" as "previous one is dead" gets stronger the faster you skim release notes. I track updates daily, and that reflex almost took over.

The installed binary carries the model catalog

The Claude Code native binary stores its supported model identifiers as plain strings. Pin a version, run strings over it, and you get the full set that build knows about.

#!/usr/bin/env bash
# model_catalog.sh — pull the model ID catalog out of the installed CLI
# usage: ./model_catalog.sh > catalog.txt
set -euo pipefail
 
BIN="$(command -v claude || true)"
if [ -z "$BIN" ]; then
  echo "claude is not on PATH" >&2
  exit 1
fi
BIN="$(readlink -f "$BIN")"
 
# Always record which build you read. The catalog is only what that build knows.
echo "# source: $BIN" >&2
claude --version >&2
 
strings -n 8 "$BIN" \
  | grep -Eo 'claude-(opus|sonnet|haiku|fable)-[0-9][a-z0-9._@-]*' \
  | sort -u

Running it against v2.1.246 (/usr/local/bin/claude, roughly 237MB) produced this:

StageCountWhat it contains
Strings beginning with claude-233Mostly internal identifiers, not models
Containing a family name (opus / sonnet / haiku / fable)38The candidate pool
Matching the ID shape25Directly usable
Failing the shape check13Not all of these are wrong, as shown below

Only 38 of the 233 claude- strings looked like model IDs at all. The rest were internal identifiers such as claude-code-agent-id and claude-cli-internal. A naive grep hands you six times more noise than signal.

This works as long as the binary is not stripped. Distribution formats change, so I'd give the gate described later a branch for "the catalog could not be read."

I ran into exactly that in a different environment: the claude command there was only a tiny launcher stub of about 2.3MB, and the same strings and grep returned zero lines. Checking the size of the executable first (about 237MB for my v2.1.246) helps separate "extraction failed" from "the catalog simply is not in there."

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You will be able to stop a bulk replacement that would break still-valid IDs, before the command runs
✦You will be able to pull a catalog of model IDs straight from the binary on your disk, with no network call and no API key
✦You will be able to narrow more than 1,300 references down to the 63 that actually need attention
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-11-05
Three Changes I Made Before Moving to Message Threads, So My Own Copy of the Conversation Stays Mine
What changes when a loop that resends the full history every turn moves to message threads, which entered beta on November 2. How create and continue differ, how to triage a 404 or 400, and where I would not migrate, all based on the official docs.
⬡ API & SDK2026-10-31
Days Vanished From My Daily Table After Moving to the Usage and Cost Analytics API — Why Empty Days Don't Come Back, and How to Zero-Fill
The Usage and Cost Analytics API (beta since 10/29) returns no rows for days with no usage. Here is why a drop-in swap from the legacy report leaves gaps, the order I'd check things in, and a small Python zero-fill, tested against mock data.
⬡ API & SDK2026-10-27
Three Places Python SDK 2.0.0 Breaks Your Code — A Checking Order Built on a Mocked Transport
Upgrading to Python SDK 2.0.0 changes behavior in three places: the temperature argument, the auth header, and double credentials. Here are the outputs I reproduced on a mocked transport, the fix for proxy setups, and the order I check in.