mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
fix(adr-093): user-facing model listing — sync DEFAULT_MODEL_MAPPINGS
Verification commit (post Commit 6). User-perspective smoke caught a gap
that unit tests missed:
`aqe llm models` reads DEFAULT_MODEL_MAPPINGS from
src/shared/llm/router/types.ts, which is a separate registry from
MODEL_REGISTRY in model-registry.ts. Commit 2's sed sweep updated the
provider IDs inside DEFAULT_MODEL_MAPPINGS (anthropic path became
claude-opus-4-7 / claude-sonnet-4-6 / claude-haiku-4-5-20251001) but
left the canonicalId and canonicalName fields as 'claude-opus-4.5',
'claude-sonnet-4', 'claude-haiku-3.5'. Result:
* canonical claude-opus-4.5 → anthropic claude-opus-4-7, bedrock
anthropic.claude-opus-4-5-v1:0. Same canonical resolved to two
different models across providers (routing bug).
* `aqe llm models` output listed stale names (Opus 4.5 / Sonnet 4 /
Haiku 3.5) despite the backing model being 4.7 / 4.6 / 4.5.
Fix: rewrite the three Claude entries as first-class Opus 4.7 /
Sonnet 4.6 / Haiku 4.5 records with consistent canonicalId, canonical
names, all three provider IDs, 1M context for 4.7, correct pricing
($5/$25 for Opus, unchanged $3/$15 for Sonnet, $1/$5 for Haiku),
64k / 128k / 16k max output tokens respectively.
Verification (user perspective):
* npm run build: CLI + MCP bundles built clean
* node dist/cli/bundle.js llm models → shows Opus 4.7/Sonnet 4.6/Haiku 4.5
* node dist/cli/bundle.js llm cost claude-opus-4-7 --tokens 10000
→ "Claude Opus 4.7", $5/$25, $0.30 total (correct)
* node dist/cli/bundle.js llm cost claude-sonnet-4-6 --tokens 10000
→ "Claude Sonnet 4.6", $3/$15, $0.18 total (correct)
* MCP bundle loads ("MCP server starting v3.9.12")
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1442,14 +1442,14 @@ export type RouterPreset =
|
||||
* This enables vendor-neutral model references
|
||||
*/
|
||||
export const DEFAULT_MODEL_MAPPINGS: ModelMapping[] = [
|
||||
// Claude Opus 4.5 (flagship)
|
||||
// ADR-093: Claude Opus 4.7 (flagship, Apr 2026)
|
||||
{
|
||||
canonicalId: 'claude-opus-4.5',
|
||||
canonicalName: 'Claude Opus 4.5',
|
||||
canonicalId: 'claude-opus-4-7',
|
||||
canonicalName: 'Claude Opus 4.7',
|
||||
providerIds: {
|
||||
claude: 'claude-opus-4-7',
|
||||
openrouter: 'anthropic/claude-opus-4.5',
|
||||
bedrock: 'anthropic.claude-opus-4-5-v1:0',
|
||||
openrouter: 'anthropic/claude-opus-4.7',
|
||||
bedrock: 'anthropic.claude-opus-4-7-v1:0',
|
||||
},
|
||||
capabilities: {
|
||||
supportsStreaming: true,
|
||||
@@ -1458,22 +1458,22 @@ export const DEFAULT_MODEL_MAPPINGS: ModelMapping[] = [
|
||||
supportsVision: true,
|
||||
supportsExtendedThinking: true,
|
||||
supportsJsonMode: true,
|
||||
maxContextTokens: 200000,
|
||||
maxOutputTokens: 32000,
|
||||
maxContextTokens: 1_000_000,
|
||||
maxOutputTokens: 128000,
|
||||
},
|
||||
tier: 'flagship',
|
||||
family: 'claude',
|
||||
inputCostPer1M: 15,
|
||||
outputCostPer1M: 75,
|
||||
inputCostPer1M: 5,
|
||||
outputCostPer1M: 25,
|
||||
},
|
||||
// Claude Sonnet 4 (advanced)
|
||||
// ADR-093: Claude Sonnet 4.6 (advanced)
|
||||
{
|
||||
canonicalId: 'claude-sonnet-4',
|
||||
canonicalName: 'Claude Sonnet 4',
|
||||
canonicalId: 'claude-sonnet-4-6',
|
||||
canonicalName: 'Claude Sonnet 4.6',
|
||||
providerIds: {
|
||||
claude: 'claude-sonnet-4-6',
|
||||
openrouter: 'anthropic/claude-sonnet-4',
|
||||
bedrock: 'anthropic.claude-sonnet-4-v1:0',
|
||||
openrouter: 'anthropic/claude-sonnet-4.6',
|
||||
bedrock: 'anthropic.claude-sonnet-4-6-v1:0',
|
||||
},
|
||||
capabilities: {
|
||||
supportsStreaming: true,
|
||||
@@ -1490,29 +1490,29 @@ export const DEFAULT_MODEL_MAPPINGS: ModelMapping[] = [
|
||||
inputCostPer1M: 3,
|
||||
outputCostPer1M: 15,
|
||||
},
|
||||
// Claude Haiku 3.5 (standard)
|
||||
// ADR-093: Claude Haiku 4.5 (standard)
|
||||
{
|
||||
canonicalId: 'claude-haiku-3.5',
|
||||
canonicalName: 'Claude Haiku 3.5',
|
||||
canonicalId: 'claude-haiku-4-5',
|
||||
canonicalName: 'Claude Haiku 4.5',
|
||||
providerIds: {
|
||||
claude: 'claude-haiku-4-5-20251001',
|
||||
openrouter: 'anthropic/claude-3.5-haiku',
|
||||
bedrock: 'anthropic.claude-3-5-haiku-v1:0',
|
||||
openrouter: 'anthropic/claude-haiku-4.5',
|
||||
bedrock: 'anthropic.claude-haiku-4-5-v1:0',
|
||||
},
|
||||
capabilities: {
|
||||
supportsStreaming: true,
|
||||
supportsTools: true,
|
||||
supportsMCP: false,
|
||||
supportsVision: true,
|
||||
supportsExtendedThinking: false,
|
||||
supportsExtendedThinking: true,
|
||||
supportsJsonMode: true,
|
||||
maxContextTokens: 200000,
|
||||
maxOutputTokens: 8192,
|
||||
maxOutputTokens: 16384,
|
||||
},
|
||||
tier: 'standard',
|
||||
family: 'claude',
|
||||
inputCostPer1M: 0.8,
|
||||
outputCostPer1M: 4,
|
||||
inputCostPer1M: 1,
|
||||
outputCostPer1M: 5,
|
||||
},
|
||||
// GPT-4o (advanced)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user