Originally created by: lodar
Every hardcoded Claude model id in the CLI was stale, and they disagreed with each other:
| Call site | Was | Now |
|---|---|---|
src/cmd_compose.sh |
opus -> claude-opus-4-8, sonnet -> claude-sonnet-4-6 |
resolves via catalogue |
src/lib/agent_setup.sh (create-path pin) |
claude-opus-4-8 |
resolves via catalogue |
plugin MODEL_ALIASES (separate PR) |
opus -> claude-opus-4-7 |
reads 5dive models --json |
claude-opus-5 appeared nowhere in src/, and fable was not selectable by alias at all — cmd_compose.sh only knew opus/sonnet/haiku.
New src/lib/models.sh owns the catalogue:
model_latest() — opus | sonnet | fable | haiku -> current full id. This is the source of truth; a model release edits one line here.resolve_model_alias() — resolves an alias; passes a full id, a BYO vendor/model slug, or empty through untouched.5dive models [--json] — prints the map in the standard {ok,data} envelope, so the telegram plugin can resolve its /model picker against it (5dive-plugins#dive-1883-model-sot).Current ids: opus claude-opus-5, sonnet claude-sonnet-5, fable claude-fable-5, haiku claude-haiku-4-5-20251001.
The create path still writes a full resolved id, never a bare alias — CC >= 2.1.181 runs a startup migration (migrationVersion 13, fires on any launch) that strips model: "opus" from a fresh config dir, stranding a new agent on the default model. It is now resolved from the catalogue instead of a baked constant.
The asymmetry with the nightly heal in 5dive-api scripts/update.sh — which writes the bare alias to existing agents on purpose, safe because their config dir is not fresh, so they float forward — is unchanged and documented in models.sh so nobody "unifies" the two.
The third-party BYO catalogues in header.sh (CLAUDE_PROVIDER_*_MODEL, HERMES_PROVIDER_MODEL, OPENCLAW_PROVIDER_MODEL) are vendor-registry slugs on other endpoints, not first-party ids, and are untouched. [openrouter]="anthropic/claude-opus-4.8" looks stale next to its already-current sonnet entry, but the replacement slug needs verifying against openrouter.ai first.
tests/model_aliases_unit.sh — 22 assertions: alias resolution incl. fable, pass-through for full ids / BYO slugs / empty / unknown, every family mapped, models_json shape, the {ok,data} envelope and text form off the built binary, a DIVE-506 guard that no resolved pin is a bare alias, and a drift guard that no .sh outside models.sh re-inlines a claude-* id (comments and the vendor catalogues exempted).
tests/byo_model_create_unit.sh updated to assert the shape of the default (${3:-$(resolve_model_alias opus)}) rather than the id, so a model release no longer has to touch it. Green, along with agent_isolation_unit.sh and branch_hygiene_unit.sh.
claude-opus-5 instead of claude-opus-4-8 at birth. Not covered by the VM smoke — per tonight's finding the codex row skips for want of a key and a SKIP still rolls up into "all rows ok", so treat smoke silence here as no evidence either way.🤖 Generated with Claude Code
Ticket changed by: lodar