Files
litellm/tests/test_litellm
shin-bot-litellm e2475f4f9a fix(test): correct prompt_tokens in test_string_cost_values (#20185)
The test had prompt_tokens=1000 but the sum of token details was 1150
(text=700 + audio=100 + cached=200 + cache_creation=150).

This triggered the double-counting detection logic which recalculated
text_tokens to 550, causing the assertion to fail.

Fixed by setting prompt_tokens=1150 to match the sum of details.
2026-01-31 14:23:10 -08:00
..
2026-01-24 11:13:44 -08:00
2026-01-24 14:08:48 -08:00

Testing for litellm/

This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.

The point of this is to:

  1. Increase test coverage of litellm/
  2. Make it easy for contributors to add tests for the litellm/ package and easily run tests without needing LLM API keys.

File name conventions

  • litellm/proxy/test_caching_routes.py maps to litellm/proxy/caching_routes.py
  • test_<filename>.py maps to litellm/<filename>.py