From c36f3afa76c88ebd350df4da648f39cf9fb451e8 Mon Sep 17 00:00:00 2001 From: Resham Joshi <65915470+iamtoruk@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:51:51 +0200 Subject: [PATCH] chore(pricing): temp Fable 5 + Mythos 5 launch pricing ($10/$50 per M) + names until LiteLLM indexes them (#463) --- src/models.ts | 17 +++++++++++++++++ tests/models.test.ts | 13 +++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/models.ts b/src/models.ts index 801ffc9e..2a5e9e1a 100644 --- a/src/models.ts +++ b/src/models.ts @@ -44,6 +44,20 @@ function loadSnapshot(): Map { fastMultiplier: fast ?? 1, }) } + // TEMP (2026-06-09): Fable 5 / Mythos 5 launch pricing, $10/M input and $50/M output, + // until LiteLLM indexes them. Added as snapshot fallbacks so a real LiteLLM entry, once + // it exists, takes precedence (mergeSnapshotFallbacks only fills gaps). Remove then. + const tempLaunch: ModelCosts = { + inputCostPerToken: 0.00001, + outputCostPerToken: 0.00005, + cacheWriteCostPerToken: 0.0000125, + cacheReadCostPerToken: 0.000001, + webSearchCostPerRequest: WEB_SEARCH_COST, + fastMultiplier: 1, + } + for (const id of ['claude-fable-5', 'claude-mythos-5']) { + if (!map.has(id)) map.set(id, { ...tempLaunch }) + } return map } @@ -466,6 +480,9 @@ const autoModelNames: Record = { } const SHORT_NAMES: Record = { + // TEMP (2026-06-09): until deriveClaudeShortName or LiteLLM cover them. + 'claude-fable-5': 'Fable 5', + 'claude-mythos-5': 'Mythos 5', // Modern claude--- ids are derived in deriveClaudeShortName. // Only the legacy 3.x ids (family-last) need explicit mapping. 'claude-3-7-sonnet': 'Sonnet 3.7', diff --git a/tests/models.test.ts b/tests/models.test.ts index 8c2edf3f..4c76f713 100644 --- a/tests/models.test.ts +++ b/tests/models.test.ts @@ -69,6 +69,19 @@ describe('getShortModelName', () => { }) }) +describe('Fable 5 / Mythos 5 launch pricing (temporary)', () => { + it('prices fable-5 and mythos-5 at $10/M input, $50/M output', () => { + for (const id of ['claude-fable-5', 'claude-mythos-5']) { + expect(calculateCost(id, 1_000_000, 0, 0, 0, 0)).toBeCloseTo(10, 6) + expect(calculateCost(id, 0, 1_000_000, 0, 0, 0)).toBeCloseTo(50, 6) + } + }) + it('gives them their own display names', () => { + expect(getShortModelName('claude-fable-5')).toBe('Fable 5') + expect(getShortModelName('claude-mythos-5')).toBe('Mythos 5') + }) +}) + describe('builtin aliases - getModelCosts', () => { it('resolves anthropic--claude-4.6-opus', () => { expect(getModelCosts('anthropic--claude-4.6-opus')).not.toBeNull()