litellm/tests/integration/cost_calculation
Kerry Lu 1efca39054
fix(openai): bill the audio output tokens OpenAI reports for gpt-4o-mini-tts speech (#52317)
* fix(openai): bill the audio output tokens OpenAI reports for token-priced speech models

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(openai): type the speech usage stream and expect stream_format on the wire test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(openai): flush the last speech event and ask for uncompressed events

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-17 11:35:30 -08:00
..
bridge_cost_parity test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
cases fix(openai): bill the audio output tokens OpenAI reports for gpt-4o-mini-tts speech (#52317) 2026-11-17 11:35:30 -08:00
stream_parity test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
assertions.py test(integration): assert the streamed usage.cost matches the spend row on every cost case (#46762) 2026-10-15 22:34:42 +00:00
catalog.py test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
conftest.py test(cost): cover custom deployment aliases, off-peak pricing, bridge usage shapes and duplicate spend rows (#46708) 2026-10-15 10:44:51 -07:00
cost_map.py test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
cost_tracking_case.py fix(transcription): stop billing a FLAC with no sample count as 576 trillion seconds (#50842) 2026-11-10 06:19:33 +00:00
test_base_model_cross_provider_spend.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00
test_batch_realtime_cost.py test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
test_bridged_previous_response_id_spend.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00
test_cost_tracking.py test(cost): mark the cost tracking cases the reconciliation automation bills against the real provider (#52226) 2026-11-17 07:01:32 +00:00
test_messages_bridged_stream_margin_discount.py fix(cost): keep upstream_usage_cost on the Responses stream logging copy so bridged /v1/messages rows price their tokens (#49365) 2026-10-31 09:52:22 -07:00
test_responses_websocket_guardrail_spend.py test(integration): give each owned proxy a private database and Redis by default (#47213) 2026-10-18 03:37:41 +00:00