Files
litellm/tests
mateo-berri bd1cddcbe2 feat(translation): v2 chat translation core (OpenAI to Anthropic) behind opt-in flag
Introduce litellm/translation, the hub-and-spoke v2 of core LLM translation
from Mateo's Cycle 4 scope. Inbound parsers map a request schema into a frozen
IR, provider serializers map the IR onto one wire format, and dispatch.route is
the single v1/v2 fork carrying the same-family fast-path predicate

This first slice ports the OpenAI-chat-in to Anthropic-out request path and
proves it differential-green: a corpus runs the v1 AnthropicConfig chain
(map_openai_params then transform_request) and the v2 pipeline over the same
requests and asserts identical normalized JSON across text, system, multi-turn,
stop and stream, tools, every tool_choice form, tool-call round-trips, parallel
tool-result merging, assistant-text-plus-tool-call, images, and the max_tokens
default

Built on Expression (frozen Block and Map, Result, tagged unions); failures are
values, I/O is an injected port, and the package is import-isolated from the v1
stack, enforced by a test that stands in for an import-linter contract. The
anthropic flag stays off, and response and stream parsing, the other inbound
schemas and providers, and wiring route into completion are follow-ups
2026-06-11 15:59:37 +00:00
..

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.