From c1dcfa70c97beeb598476579b46473468d7a2019 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 14 Apr 2026 18:20:28 -0700 Subject: [PATCH] feat(types): add cache_read_cost and cache_creation_cost fields to CostBreakdown TypedDict --- litellm/types/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index c6fa61f8a97..0e3bc8f3ed3 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -2798,7 +2798,9 @@ class CostBreakdown(TypedDict, total=False): Detailed cost breakdown for a request """ - input_cost: float # Cost of input/prompt tokens + input_cost: float # Cost of raw (non-cached) input tokens only + cache_read_cost: float # Cost of cache-read tokens (discounted rate) + cache_creation_cost: float # Cost of cache-write tokens (premium rate) output_cost: ( float # Cost of output/completion tokens (includes reasoning if applicable) )