fix(aliases): stop rewriting canonical claude-opus-4-6-thinking
The claude-thinking-legacy-alias pattern previously matched both claude-opus-4-6-thinking and claude-opus-4-7-thinking and mapped them to claude-opus-4-7. After models.dev started shipping claude-opus-4-6-thinking as a real canonical model (e.g. 302ai/claude-opus-4-6-thinking), the pattern collides with the snapshot and trips the pattern-alias-collides-with-snapshot guardrail in collectModelCapabilityGuardrailIssues, which is what has been failing the refresh-model-capabilities cron since 2026-04-20. Tightening the regex to only match claude-opus-4-7-thinking preserves the legacy-id rewrite for the still-non-canonical 4-7-thinking form while letting 4-6-thinking resolve to itself. Refs #3635
This commit is contained in:
@@ -107,4 +107,14 @@ describe("model-capability-aliases", () => {
|
||||
ruleID: "claude-thinking-legacy-alias",
|
||||
})
|
||||
})
|
||||
|
||||
test("treats claude-opus-4-6-thinking as canonical, not as a legacy alias", () => {
|
||||
const result = resolveModelIDAlias("claude-opus-4-6-thinking")
|
||||
|
||||
expect(result).toEqual({
|
||||
requestedModelID: "claude-opus-4-6-thinking",
|
||||
canonicalModelID: "claude-opus-4-6-thinking",
|
||||
source: "canonical",
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user