From 50ff0c1346f948be9aa09f352bbf6869ce26ade0 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 f4995911e8d..7f71fce635e 100644 --- a/litellm/litellm_core_utils/llm_cost_calc/utils.py +++ b/litellm/litellm_core_utils/llm_cost_calc/utils.py @@ -754,14 +754,7 @@ def _get_effective_prompt_tokens_for_tiered_pricing(usage: Usage) -> float: audio_tokens: Final = _loose_token_count(_detail_token(details, "audio_tokens")) image_tokens: Final = _loose_token_count(_detail_token(details, "image_tokens")) video_tokens: Final = _loose_token_count(_detail_token(details, "video_tokens")) - detail_total: Final = ( - text_tokens - + audio_tokens - + image_tokens - + video_tokens - + cached_tokens - + cache_creation - ) + detail_total: Final = text_tokens + audio_tokens + image_tokens + video_tokens + cached_tokens + cache_creation modality_cache_tokens: Final = cached_tokens + cache_creation if modality_cache_tokens > 0 and detail_total > prompt_tokens: return prompt_tokens