litellm/litellm/responses
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
..
file_search refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
litellm_completion_transformation fix(responses): only merge repeated Codex tools when drop_params is on (#49112) 2026-10-29 12:55:29 -07:00
mcp fix(streaming): rebuild each choice of an n>1 chat stream on its own (#49002) 2026-10-29 18:29:14 -07:00
additional_tools.py fix(responses): only merge repeated Codex tools when drop_params is on (#49112) 2026-10-29 12:55:29 -07:00
bridge_check.py feat(azure_ai): reach Foundry agents through the project Responses API (#47717) 2026-10-28 20:49:58 -07:00
dispatch.py refactor(rust-bridge): detect Python-only features in the catalog instead of Rust declines (#46714) 2026-10-20 15:06:25 -07:00
main.py fix(cost): bill a deployment's per-second rates on native Anthropic /v1/messages (#42417) 2026-10-29 05:29:03 -07:00
retrieve_stream_query.py fix(responses): resume background response streams with stream and starting_after (#48819) 2026-10-29 02:31:22 -07:00
sse_output_recovery.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
streaming_iterator.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
utils.py fix(openai): warn when the GPT-5 reasoning effort gate drops a level under drop_params (#47761) 2026-10-29 04:46:29 -07:00