[bug] inference() flags a false model downgrade when the model is pinned by a tier…
What happened
inference() flags a false model downgrade when the model is pinned by a tier alias such as fable
Summary
inference() reports a silent model downgrade when the caller pins the model with a tier alias, even though the requested model ran.
Where: LIFEOS/TOOLS/Inference.ts:634
const expectedTier = (!modelOverride && options.model ? parseClaudeId(options.model)?.tier : null) ?? EFFORT_MODEL[level];
parseClaudeId (LIFEOS/TOOLS/models.ts:34) only matches full ids (claude-<family>-<n>...), so for an alias like "fable" it returns null and the expected tier falls back to EFFORT_MODEL[level]. models.ts:9 recommends aliases everywhere, so this is the documented way to pin a model.
Repro:
const r = await inference({ level: "medium", model: "fable", effort: "high", systemPrompt: "x", userPrompt: "y" });
// r.executedModel === "claude-fable-5-2", r.modelDowngraded === true
The call runs on Fable, but expectedTier is "sonnet" (EFFORT_MODEL.medium), so verifyExecutedModel flags it as downgraded and logModelVerification records a downgrade that did not happen. Callers that trust modelDowngraded (or the verification log) see false alarms; a real downgrade from an alias-pinned call would look the same as these.
Suggested fix: resolve an alias before the fallback, e.g. take the tier directly when options.model is one of TIER_NAMES, then parseClaudeId(...)?.tier, then EFFORT_MODEL[level].
Checked against current main (LifeOS/install/LIFEOS/TOOLS/Inference.ts:634, models.ts:34): unchanged.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
You were right: when a call pinned its model with a tier name like "fable", the downgrade check compared the run against the level's default tier, so a correct Fable run was logged as a downgrade. The check now reads the tier straight from a tier name (including forms like "opus[1m]") before it falls back to the level default. A run on the tier you pinned no longer shows up as a downgrade, and a real downgrade still does.
This fix lands in the next LifeOS release, so I'm closing this now.