Files
litellm/tests/test_litellm
mateo-berri e1d32fe4d1 test(translation): two-sided bedrock differential gates over the characterization corpus
The reference corpus (cases, recorded fixtures, canonical-JSON snapshots for
both bedrock chat routes) is copied verbatim from the translation
characterization branch; each request row asserts snapshot == v1-at-HEAD
(drift guard) == v2 (byte-equal). Responses and streams run full cycles
against v1's transform_response and the real stream decoders inside
CustomStreamWrapper at the parsed-event seam, with the corpus's
fastuuid/time freeze. A quirk corpus pins bedrock-only behaviors against v1
in-process: claude-4.5 cache ttl and parallel tool config, bedrock tool-name
normalization, thinking budget clamp, json_schema-with-effort dropping the
forced choice, tool_choice none gates, and the explained fallbacks
(pdf/file parts, non-Claude models, invoke response_format x reasoning).
Seam tests drive litellm.completion() through respx-intercepted SigV4 calls
for both routes. DIFFERENTIAL_REPORT.md gains the bedrock sections:
126 rows, 0 divergent.
2026-06-11 22:08:20 +00:00
..
2026-06-10 10:34:07 -07:00
2026-06-08 13:49:52 -07:00
2026-03-27 21:21:43 +05:30
2026-02-27 13:33:34 +05:30
2026-05-18 16:27:44 -07:00
2026-06-10 10:34:07 -07:00
2026-03-28 19:17:38 -07: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