mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Update litellm/litellm_core_utils/llm_cost_calc/utils.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
718118f3e4
commit
d60f5bff56
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue