mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Fix batches api cost tracking + Log batch models in spend logs / standard logging payload (#9077)
* feat(batches/): fix batch cost calculation - ensure it's accurate use the correct cost value - prev. defaulting to non-batch cost * feat(batch_utils.py): log batch models to spend logs + standard logging payload makes it easy to understand how cost was calculated * fix: fix stored payload for test * test: fix test
This commit is contained in:
parent
048ff931be
commit
44c9eef64f
8 changed files with 110 additions and 7 deletions
|
@ -4408,6 +4408,12 @@ def _get_model_info_helper( # noqa: PLR0915
|
|||
input_cost_per_audio_token=_model_info.get(
|
||||
"input_cost_per_audio_token", None
|
||||
),
|
||||
input_cost_per_token_batches=_model_info.get(
|
||||
"input_cost_per_token_batches"
|
||||
),
|
||||
output_cost_per_token_batches=_model_info.get(
|
||||
"output_cost_per_token_batches"
|
||||
),
|
||||
output_cost_per_token=_output_cost_per_token,
|
||||
output_cost_per_audio_token=_model_info.get(
|
||||
"output_cost_per_audio_token", None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue