You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: every hardcoded Claude model id was stale, and they disagreed with each other.cmd_compose.sh mapped opus -> claude-opus-4-8 / sonnet -> claude-sonnet-4-6, agent_setup.sh defaulted the create-path pin to claude-opus-4-8, and the telegram plugin's MODEL_ALIASES mapped opus -> claude-opus-4-7 — a whole version behind the CLI. So /model opus over Telegram and 5dive compose gave you two different models, and every newly created agent was pinned to 4.8 at birth. claude-opus-5 appeared nowhere in src/.
new src/lib/models.sh is the single source of truth.model_latest() maps opus | sonnet | fable | haiku to the current full id; resolve_model_alias() resolves an alias and passes anything else (a full id, a BYO vendor/model slug, empty) through untouched. Both CLI call sites now resolve through it. A model release is a one-line change in that file and nowhere else.
feat: fable is selectable. The compose/create alias map only knew opus/sonnet/haiku, so fable could not be picked by alias at all. Current ids: opus claude-opus-5, sonnet claude-sonnet-5, fable claude-fable-5, haiku claude-haiku-4-5-20251001.
feat: 5dive models [--json] prints the alias -> id map. The telegram plugin reads 5dive models --json at boot and merges the result into MODEL_ALIASES (baked defaults remain the fallback for upstream/non-5dive hosts), so the picker can no longer drift from the CLI.
DIVE-506 behaviour is preserved deliberately. The create path still writes a FULL RESOLVED id, never a bare alias — CC >= 2.1.181 runs a startup migration (migrationVersion 13) 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, safe because their config dir is not fresh, so they float forward) is unchanged and documented in models.sh.
out of scope, flagged: the third-party BYO/OpenRouter catalogues in header.sh (CLAUDE_PROVIDER_*_MODEL, HERMES_PROVIDER_MODEL, OPENCLAW_PROVIDER_MODEL) are vendor slugs on a different registry, not first-party ids, and were left 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 before it is changed.
test: tests/model_aliases_unit.sh — alias resolution incl. fable, pass-through for full ids / BYO slugs / empty, every family mapped, models_json shape, a DIVE-506 guard that no resolved pin is a bare alias, a drift guard that no .sh outside models.sh re-inlines a claude-* id, and a bundle check that ./build.sh was re-run.