mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-26 00:23:51 +00:00
* fix(adapter): populate cache_read_input_tokens from prompt_tokens_details The Anthropic adapter's translate_openai_response_to_anthropic checked only the private _cache_read_input_tokens attr (set by Anthropic/DeepSeek) but not prompt_tokens_details.cached_tokens (set by OpenAI/Azure). Use prompt_tokens_details.cached_tokens directly — it is already extracted and is the standard field populated by all providers. Fixes #22089 * fix(adapter): apply same cache_read_input_tokens fix to streaming path The streaming path in translate_streaming_openai_response_to_anthropic had the same bug — relying on _cache_read_input_tokens instead of prompt_tokens_details.cached_tokens.
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.