From 97d331f7fb5a76777812d4c2b41ec48cc058da97 Mon Sep 17 00:00:00 2001 From: its-amann Date: Sun, 28 Jun 2026 10:32:28 +0530 Subject: [PATCH] Format cost utility after merge --- litellm/litellm_core_utils/llm_cost_calc/utils.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/litellm/litellm_core_utils/llm_cost_calc/utils.py b/litellm/litellm_core_utils/llm_cost_calc/utils.py index 0666dee12fa..09c01a4cb00 100644 --- a/litellm/litellm_core_utils/llm_cost_calc/utils.py +++ b/litellm/litellm_core_utils/llm_cost_calc/utils.py @@ -635,14 +635,7 @@ def _get_effective_prompt_tokens_for_tiered_pricing(usage: Usage) -> float: audio_tokens = float(getattr(details, "audio_tokens", 0) or 0) image_tokens = float(getattr(details, "image_tokens", 0) or 0) video_tokens = float(getattr(details, "video_tokens", 0) or 0) - detail_total = ( - text_tokens - + audio_tokens - + image_tokens - + video_tokens - + cached_tokens - + cache_creation - ) + detail_total = text_tokens + audio_tokens + image_tokens + video_tokens + cached_tokens + cache_creation cache_detail_tokens = cached_tokens + cache_creation if cache_detail_tokens > 0 and detail_total > prompt_tokens: return prompt_tokens