mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 12:16:38 +00:00
feat: support claude opus 5
This commit is contained in:
1 parent
2043c65de7
commit
ee90dd2640
5 files changed
+84
-1
No files matched your search
@@ -285,10 +285,26 @@ describe('model-pricing', () => {
|
||||
expect(sonnet5.cacheReadPerMillion).toBe(0.3);
|
||||
});
|
||||
|
||||
it('should return Opus-tier pricing for Claude Opus 5', () => {
|
||||
// Opus 5 mirrors Opus 4.8 rates; date-stamped ids resolve via stripDateSuffix.
|
||||
const opus5 = getModelPricing('claude-opus-5');
|
||||
expect(opus5.inputPerMillion).toBe(5.0);
|
||||
expect(opus5.outputPerMillion).toBe(25.0);
|
||||
expect(opus5.cacheCreationPerMillion).toBe(6.25);
|
||||
expect(opus5.cacheReadPerMillion).toBe(0.5);
|
||||
expect(getModelPricing('claude-opus-5-20270101').inputPerMillion).toBe(5.0);
|
||||
});
|
||||
|
||||
it('should apply fast-tier pricing for Claude Opus 5', () => {
|
||||
const opus5fast = getModelPricing('claude-opus-5', { serviceTier: 'fast' });
|
||||
expect(opus5fast.inputPerMillion).toBe(10.0);
|
||||
expect(opus5fast.outputPerMillion).toBe(50.0);
|
||||
});
|
||||
|
||||
it('should not map unknown future model families onto known family pricing', () => {
|
||||
const fallback = getModelPricing('unknown-model-xyz');
|
||||
|
||||
expect(getModelPricing('claude-opus-5-20270101')).toEqual(fallback);
|
||||
expect(getModelPricing('claude-opus-6-20270101')).toEqual(fallback);
|
||||
expect(getModelPricing('gemini-3.2-pro')).toEqual(fallback);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user