chore(pricing): temp Fable 5 + Mythos 5 launch pricing ($10/$50 per M) + names until LiteLLM indexes them (#463)

This commit is contained in:
Resham Joshi 2026-06-09 20:51:51 +02:00 • committed by GitHub
parent 8e460096e3
commit c36f3afa76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 0 deletions

View file

@ -44,6 +44,20 @@ function loadSnapshot(): Map<string, ModelCosts> {
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<string, string> = {
}
const SHORT_NAMES: Record<string, string> = {
// TEMP (2026-06-09): until deriveClaudeShortName or LiteLLM cover them.
'claude-fable-5': 'Fable 5',
'claude-mythos-5': 'Mythos 5',
// Modern claude-<family>-<major>-<minor> ids are derived in deriveClaudeShortName.
// Only the legacy 3.x ids (family-last) need explicit mapping.
'claude-3-7-sonnet': 'Sonnet 3.7',

View file

@ -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()