mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-17 10:14:08 +00:00
feat(models): add Claude Fable 5.1 and correct Sonnet 5 pricing
Register `claude-fable-5-1` in the CLIProxy model catalog, the dashboard
catalog, and the usage pricing registry.
Pricing is taken from Anthropic's official pricing page:
- Fable 5.1 base rates are $10/$50 per MTok with a $12.50 5m cache write,
matching Fable 5.
- Cache hits bill at 0.025x base input ($0.25/MTok) rather than the
standard 0.1x multiplier. Anthropic applies that reduced rate only to
Fable 5.1 and Mythos 5.1, so this entry cannot derive its cache rates
from CACHE_READ_MULTIPLIER.
This also corrects Claude Sonnet 5 from $3/$15 to $2/$10 (cache write
$2.50, cache read $0.20). The launch introductory rate became the
standard price and the increase scheduled for 2026-09-01 was cancelled,
so the previous entry over-reported Sonnet 5 usage cost by 50%.
Thinking on Fable 5.1 is always on and can only be steered through
effort levels, so the catalog entry exposes the same `low`..`max` level
surface as Fable 5 and Opus 5 instead of a manual token budget.
The GitHub Copilot catalog is deliberately left unchanged, since Copilot
availability for Fable 5.1 is not verified; surfacing it there would
offer a model the backend may reject.
Regenerates docs/reports/hardening-inventory.{json,md} so the ci-parity
gate matches the source tree.
This commit is contained in:
1 parent
485c436958
commit
3583b544d0
8 files changed
+83
-22
No files matched your search
@@ -277,12 +277,24 @@ describe('model-pricing', () => {
|
||||
expect(fable5.cacheReadPerMillion).toBe(1.0);
|
||||
});
|
||||
|
||||
it('should return correct pricing for Claude Fable 5.1', () => {
|
||||
// Same base rates as Fable 5, but cache hits bill at 0.025x base input
|
||||
// ($0.25/MTok) rather than the standard 0.1x multiplier.
|
||||
const fable51 = getModelPricing('claude-fable-5-1');
|
||||
expect(fable51.inputPerMillion).toBe(10.0);
|
||||
expect(fable51.outputPerMillion).toBe(50.0);
|
||||
expect(fable51.cacheCreationPerMillion).toBe(12.5);
|
||||
expect(fable51.cacheReadPerMillion).toBe(0.25);
|
||||
});
|
||||
|
||||
it('should return correct pricing for Claude Sonnet 5', () => {
|
||||
// The $2/$10 launch introductory rate became the standard price; the
|
||||
// scheduled 2026-09-01 increase to $3/$15 was cancelled.
|
||||
const sonnet5 = getModelPricing('claude-sonnet-5');
|
||||
expect(sonnet5.inputPerMillion).toBe(3.0);
|
||||
expect(sonnet5.outputPerMillion).toBe(15.0);
|
||||
expect(sonnet5.cacheCreationPerMillion).toBe(3.75);
|
||||
expect(sonnet5.cacheReadPerMillion).toBe(0.3);
|
||||
expect(sonnet5.inputPerMillion).toBe(2.0);
|
||||
expect(sonnet5.outputPerMillion).toBe(10.0);
|
||||
expect(sonnet5.cacheCreationPerMillion).toBe(2.5);
|
||||
expect(sonnet5.cacheReadPerMillion).toBe(0.2);
|
||||
});
|
||||
|
||||
it('should return Opus-tier pricing for Claude Opus 5', () => {
|
||||
@@ -430,7 +442,7 @@ describe('model-pricing', () => {
|
||||
cacheReadTokens: 1_000_000,
|
||||
};
|
||||
const cost = calculateCost(usage, 'claude-sonnet-5');
|
||||
expect(cost).toBe(22.05); // 3 + 15 + 3.75 + 0.3
|
||||
expect(cost).toBe(14.7); // 2 + 10 + 2.5 + 0.2
|
||||
});
|
||||
|
||||
it('should calculate fast-tier Claude Opus 4.8 cost (2x premium)', () => {
|
||||
|
||||
Reference in new issue
Block a user