diff --git a/backend/internal/service/billing_service.go b/backend/internal/service/billing_service.go index 3cc376f046..ffc9210a6e 100644 --- a/backend/internal/service/billing_service.go +++ b/backend/internal/service/billing_service.go @@ -426,7 +426,7 @@ func (s *BillingService) initFallbackPricing() { InputPricePerToken: 2e-6, OutputPricePerToken: 10e-6, CacheCreationPricePerToken: 2.5e-6, - CacheReadPricePerToken: 0.2e-6, + CacheReadPricePerToken: 0.1e-6, CacheCreation5mPrice: 2.5e-6, CacheCreation1hPrice: 4e-6, SupportsCacheBreakdown: true, diff --git a/backend/internal/service/billing_service_test.go b/backend/internal/service/billing_service_test.go index cb68489b49..52264f8058 100644 --- a/backend/internal/service/billing_service_test.go +++ b/backend/internal/service/billing_service_test.go @@ -2104,7 +2104,8 @@ func TestNewModelPricingCatalogFallbackAndContext(t *testing.T) { require.NoError(t, err) require.InDelta(t, 100_000*2e-6, cost.InputCost, 1e-10) require.InDelta(t, 400*2.5e-6+600*4e-6, cost.CacheCreationCost, 1e-10) - require.InDelta(t, 1000*0.2e-6, cost.CacheReadCost, 1e-10) + // Sonnet 5.5 cache hits cost 5% of the $2/MTok input price (#8378). + require.InDelta(t, 1000*0.1e-6, cost.CacheReadCost, 1e-10) require.InDelta(t, 500*10e-6, cost.OutputCost, 1e-10) require.False(t, cost.LongContextBillingApplied) }) diff --git a/backend/internal/service/pricing_service.go b/backend/internal/service/pricing_service.go index a0a65d8bf1..965832deea 100644 --- a/backend/internal/service/pricing_service.go +++ b/backend/internal/service/pricing_service.go @@ -153,7 +153,7 @@ var ( claudeSonnet55FallbackPricing = &LiteLLMModelPricing{ InputCostPerToken: 2e-6, OutputCostPerToken: 10e-6, CacheCreationInputTokenCost: 2.5e-6, CacheCreationInputTokenCostAbove1hr: 4e-6, - CacheReadInputTokenCost: 0.2e-6, + CacheReadInputTokenCost: 0.1e-6, LiteLLMProvider: "anthropic", Mode: "chat", SupportsPromptCaching: true, } claudeHaiku55FallbackPricing = &LiteLLMModelPricing{ diff --git a/backend/resources/model-pricing/model_prices_and_context_window.json b/backend/resources/model-pricing/model_prices_and_context_window.json index bbe05a937c..89b7e1f63d 100644 --- a/backend/resources/model-pricing/model_prices_and_context_window.json +++ b/backend/resources/model-pricing/model_prices_and_context_window.json @@ -1015,7 +1015,7 @@ "claude-sonnet-5-5": { "cache_creation_input_token_cost": 2.5e-06, "cache_creation_input_token_cost_above_1hr": 4e-06, - "cache_read_input_token_cost": 2e-07, + "cache_read_input_token_cost": 1e-07, "input_cost_per_token": 2e-06, "litellm_provider": "anthropic", "max_input_tokens": 1000000,