litellm/tests/integration/cost_calculation/cases
Kerry Lu 733cfeba93
fix(cost): bill a provider reported usage.cost on every path unless the deployment is priced (#48953)
* fix(cost): bill a provider reported usage.cost on every path unless the deployment is priced

* test(integration): a reported cost is attributed to output in the gateway parity cases

* fix(cost): skip a chat usage.cost that already holds litellm's stamped bill and Responses API objects

* fix(cost): record litellm's bill on the Responses terminal event so a later pricing pass does not read it as the upstream's charge

* fix(cost): mark usage.cost litellm wrote as its own bill and keep a breakdown for a reported cost

* fix(cost): keep the token breakdown when a header reported cost repeats an already priced bill

* fix(cost): read the stored breakdown total through the logging object's typed field

* refactor(cost): name the providers billed from their own usage fields for what they are

* fix(cost): keep the upstream's usage.cost beside litellm's bill and stamp a zero operator price on the stream frame

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-29 20:30:42 -07:00
..
__init__.py
anthropic.py test(cost): run azure_ai claude bridge pairs, add anthropic usage speed and vertex gemini audio priority price (#47582) 2026-10-20 17:10:16 +00:00
azure.py
batch_realtime.py
bedrock_chat_completions.py
bedrock_converse.py
bedrock_mantle.py
decisions.py test(decisions): audit #47508 (#48777) 2026-10-28 04:38:21 -07:00
fireworks_ai.py
gemini.py fix(vertex_ai): build the cachedContents collection URL under a custom api_base (#44783) 2026-10-29 03:46:35 -07:00
misc.py
openai.py fix(cost): bill a provider reported usage.cost on every path unless the deployment is priced (#48953) 2026-10-29 20:30:42 -07:00
together_ai.py
vertex_ai.py test(integration): repair seven stale integration tests on main (#47600) 2026-10-20 11:21:04 -07:00
xai.py