From d60f5bff5634deee49d8e18829960fc2ff6be675 Mon Sep 17 00:00:00 2001 From: Praveen11558 <44603409+Praveen11558@users.noreply.github.com> Date: Tue, 24 Mar 2026 23:28:58 +0530 Subject: [PATCH] Update litellm/litellm_core_utils/llm_cost_calc/utils.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/llm_cost_calc/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/llm_cost_calc/utils.py b/litellm/litellm_core_utils/llm_cost_calc/utils.py index 8d22bf6ba83..771b272d94e 100644 --- a/litellm/litellm_core_utils/llm_cost_calc/utils.py +++ b/litellm/litellm_core_utils/llm_cost_calc/utils.py @@ -711,7 +711,8 @@ def generic_cost_per_token( # noqa: PLR0915 # 2. text_tokens>0 but < total (mixed content like PDF+text) - gap fills remainder # Skip filling when has_non_token_alternative_billing is True (character_count, # video_length_seconds, or image_count are active) - those dimensions - # already account for the prompt_tokens gap. + # Skip filling when has_non_token_alternative_billing is True (character_count, + # video_length_seconds, or image_count are active) - those dimensions # already account for the prompt_tokens gap. unaccounted_tokens = usage.prompt_tokens - accounted_tokens prompt_tokens_details["text_tokens"] += unaccounted_tokens