mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
* fix(cost): honor per-second custom pricing on chat completions for every provider * test(cost): assert a per-second priced deployment bills instead of staying at $0 The zero-cost diagnostic tests from #42345 used a per-second-only entry as their misconfigured fixture, which this branch now bills. Switch that fixture to a per-query-only entry, which is still selected as the deployment's own pricing and still prices chat usage at $0, and add a per-second test asserting the call duration is billed with no diagnostic Also let a caller's explicit total_time outrank the logging window in completion_cost, so the SDK precedence stays stamped response, caller, logging * test(response_metadata): move the per-second pricing regression into the mapped tests/unit file * fix(cost_calculator): keep media-mode per-second rates off the wall-clock path A video, transcription, speech, or realtime entry's per-second rates price media seconds, which their dedicated cost paths bill from the media itself. The generic per-second branch now skips those modes, so a video status poll on a per-second video model bills nothing instead of the seconds the poll took to answer. --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| a2a_protocol | ||
| anthropic_interface | ||
| batches | ||
| chat_completions | ||
| completion_extras | ||
| compression | ||
| endpoints | ||
| enterprise | ||
| integrations | ||
| litellm_core_utils | ||
| llms | ||
| messages | ||
| models | ||
| ocr | ||
| passthrough | ||
| rag | ||
| realtime_api | ||
| repositories | ||
| router_strategy | ||
| router_utils | ||
| rust_bridge | ||
| sandbox | ||
| skills | ||
| test_router | ||
| types | ||
| videos | ||
| __init__.py | ||
| AGENTS.md | ||
| conftest.py | ||
| test_package_layout.py | ||
| test_socket_policy.py | ||