litellm-mirror/litellm/types
Krish Dholakia 9c083e7d2c 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
..
integrations fix arize config 2025-03-18 16:54:31 -07:00
llms Support Gemini audio token cost tracking + fix openai audio input token cost tracking (#9535) 2025-03-26 17:26:25 -07:00
mcp_server fix pydantic import error 2025-03-24 07:11:48 -07:00
passthrough_endpoints vertex ai anthropic thinking param support (#8853) 2025-02-26 21:37:18 -08:00
adapter.py feat(anthropic_adapter.py): support for translating anthropic params to openai format 2024-07-10 00:32:28 -07:00
caching.py (bug fix) - Fix Cache Health Check for Redis when redis_version is float (#8979) 2025-03-04 21:26:18 -08:00
completion.py feat(endpoints.py): support adding credentials by model id 2025-03-14 12:32:32 -07:00
embedding.py Removed config dict type definition 2024-05-17 10:39:00 +08:00
files.py LiteLLM Contributor PRs (02/18/2025). (#8643) 2025-02-19 21:52:46 -08:00
fine_tuning.py (feat) POST /fine_tuning/jobs support passing vertex specific hyper params (#7490) 2025-01-01 07:44:48 -08:00
guardrails.py test: update test 2025-02-10 22:13:58 -08:00
rerank.py Add cohere v2/rerank support (#8421) (#8605) 2025-02-22 22:25:29 -08:00
router.py fix supports_web_search 2025-03-22 14:02:51 -07:00
services.py (Bug Fix + Better Observability) - BudgetResetJob: (#8562) 2025-02-15 16:13:08 -08:00
utils.py test_langfuse_logging_completion 2025-03-22 18:09:04 -07:00