mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-24 18:20:07 +00:00
The response.completed handler in the completion→responses streaming bridge was discarding the usage object, causing prompt_tokens_details (and cached_tokens) to always be None when streaming with models that use the Responses API (e.g. gpt-5.2-codex, gpt-5.3-codex). Extract usage from the response.completed event and translate it via the existing _transform_response_api_usage_to_chat_usage helper. Fixes #22192
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.