mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 12:15:57 +00:00
docs(pricing): document legacy 4-7-thinking entry; cover tier metadata
Final review polish: - Add an inline comment on the claude-opus-4-7-thinking registry entry explaining it is a pricing-only id kept for historical analytics data (no catalog model after Opus 4.7 moved to adaptive thinking levels), and why it carries no fast tier. - Add a test asserting applyServiceTier preserves the serviceTiers map on its result, guarding against a future simplification dropping it. Built [OnSteroids](https://onsteroids.ai)
This commit is contained in:
@@ -296,6 +296,10 @@ const PRICING_REGISTRY: Record<string, ModelPricing> = {
|
||||
fast: OPUS_46_47_FAST_RATES,
|
||||
},
|
||||
},
|
||||
// Legacy pricing-only entry for historical analytics data; this id has no
|
||||
// catalog model (Opus 4.7 moved to adaptive thinking levels in 84dc4e24, so
|
||||
// there is no separate -thinking variant). Kept so older usage records still
|
||||
// resolve to the correct rate. No fast tier: the id is never requested live.
|
||||
'claude-opus-4-7-thinking': {
|
||||
inputPerMillion: 5.0,
|
||||
outputPerMillion: 25.0,
|
||||
|
||||
@@ -223,6 +223,14 @@ describe('model-pricing', () => {
|
||||
expect(opus48fastDated.cacheReadPerMillion).toBe(1.0);
|
||||
});
|
||||
|
||||
it('should preserve serviceTiers metadata when applying tier rates', () => {
|
||||
// applyServiceTier must keep the serviceTiers map on the returned object
|
||||
// so callers can still inspect available tiers after rate substitution.
|
||||
const opus48fast = getModelPricing('claude-opus-4-8', { serviceTier: 'fast' });
|
||||
expect(opus48fast.serviceTiers).toBeDefined();
|
||||
expect(opus48fast.serviceTiers?.fast).toBeDefined();
|
||||
});
|
||||
|
||||
it('should fall back to standard rates when serviceTier is unknown', () => {
|
||||
// Unknown tier names must not throw; revert to base pricing transparently.
|
||||
const opus48 = getModelPricing('claude-opus-4-8', { serviceTier: 'enterprise-mythos' });
|
||||
|
||||
Reference in New Issue
Block a user