diff --git a/src/analyst/benchmark-implementation.ts b/src/analyst/benchmark-implementation.ts index a66c1805..1be6e472 100644 --- a/src/analyst/benchmark-implementation.ts +++ b/src/analyst/benchmark-implementation.ts @@ -139,7 +139,7 @@ export const ANALYST_BENCHMARK_IMPLEMENTATION_FILES = Object.freeze([ ]) export const ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 = - 'fffa485899aa8f8e95213f56fb2aaefd2a244874165cee4e7dc09b81b872b94e' + '320fe06f563021515f9b1ed73a4d1fd555266f29b3c32a8cecd2fc13679e6655' export function analystBenchmarkImplementationDigest() { return ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 diff --git a/src/judge-families.ts b/src/judge-families.ts index dd312cd1..4eb8c5cc 100644 --- a/src/judge-families.ts +++ b/src/judge-families.ts @@ -56,6 +56,10 @@ const PROVIDER_PREFIX: Record = { /** Fallback model-name patterns when there's no recognised provider prefix. */ const NAME_PATTERNS: Array<[RegExp, JudgeFamily]> = [ [/claude/i, 'anthropic'], + // Anthropic's own bare aliases (`claude --model sonnet|opus|haiku`). A run that requested `sonnet` + // and was served claude-sonnet-5 is an alias resolution, not a cross-family substitution: without + // this row the alias classified as `unknown` and assertServedModel refused the pair. + [/^(?:sonnet|opus|haiku)(?:[-@\s]|$)/i, 'anthropic'], [/\b(gpt|davinci|babbage)\b|^o[134]\b|[-/]o[134]\b|gpt-/i, 'openai'], [/gemini|palm|gemma|bison/i, 'google'], [/llama/i, 'meta'], diff --git a/tests/audit-primitives.test.ts b/tests/audit-primitives.test.ts index 1a8ec035..db56703b 100644 --- a/tests/audit-primitives.test.ts +++ b/tests/audit-primitives.test.ts @@ -62,6 +62,11 @@ describe('judgeFamily + assertCrossFamily', () => { expect(judgeFamily('anthropic/claude-opus-4-5-20251101')).toBe('anthropic') expect(judgeFamily('openai/gpt-4o')).toBe('openai') expect(judgeFamily('claude-sonnet-4-6@2026-05-08')).toBe('anthropic') + // Anthropic's bare CLI aliases: an alias resolution is within-family, never a cross-family substitution. + expect(judgeFamily('sonnet')).toBe('anthropic') + expect(judgeFamily('opus')).toBe('anthropic') + expect(judgeFamily('haiku@2026-09-03')).toBe('anthropic') + expect(judgeFamily('sonnetful-model')).toBe('unknown') expect(judgeFamily('gemini-2.5-pro')).toBe('google') expect(judgeFamily('meta-llama/llama-3.3-70b')).toBe('meta') expect(judgeFamily('some-internal-model')).toBe('unknown')