Files
litellm/tests/local_testing
Krish Dholakia 4351c77253 Support Gemini audio token cost tracking + fix openai audio input token cost tracking (#9535)
* fix(vertex_and_google_ai_studio_gemini.py): log gemini audio tokens in usage object

enables accurate cost tracking

* refactor(vertex_ai/cost_calculator.py): refactor 128k+ token cost calculation to only run if model info has it

Google has moved away from this for gemini-2.0 models

* refactor(vertex_ai/cost_calculator.py): migrate to usage object for more flexible data passthrough

* fix(llm_cost_calc/utils.py): support audio token cost tracking in generic cost per token

enables vertex ai cost tracking to work with audio tokens

* fix(llm_cost_calc/utils.py): default to total prompt tokens if text tokens field not set

* refactor(llm_cost_calc/utils.py): move openai cost tracking to generic cost per token

more consistent behaviour across providers

* test: add unit test for gemini audio token cost calculation

* ci: bump ci config

* test: fix test
2025-03-26 17:26:25 -07:00
..
2025-03-13 19:26:10 -07:00
2025-03-24 23:15:04 -07:00
2025-03-26 08:12:51 -07:00
2025-03-22 13:32:22 -07:00
2025-03-11 08:27:36 -04:00
2025-01-22 20:19:31 +09:00
2025-03-11 17:52:05 -07:00
2025-03-21 16:21:18 -07:00
2025-02-10 22:13:58 -08:00
2025-01-05 13:43:32 -08:00