Files
litellm/tests
mateo-berri b64b732772 fix(translation): take critic-grok M1-M4 and verifier-grok F1/F2 (+ NITs N1, N2, N4, N5)
M1: the use_xai_oauth guard arm is documented as defense-in-depth (it is
unreachable through _raw_openai_body: litellm param, never in
non_default_params); the REAL protection is now a HARD seam obligation in
CLAUDE.md (route the kwarg or fall back pre-deps, pinned at completion()
level before flag-on) and test_use_xai_oauth_guard_reachability_facts pins
the classification facts the analysis rests on.
M2: usage token coercion now mirrors v1's int(x or 0) exactly — numeric
strings and bools fold, uncoercible values are typed boundary errors (loud
where v1 raises out of chunk_parser / Usage validation, never a silent 0);
two-sided corpus row numeric_string_usage_coerced plus loud-on-both-sides
rows for response and stream, and a fold-equality row against v1's own
static methods.
M3: one make_parse_line(parse_event) factory in openai_compat/stream.py;
openai/azure/xai all compose it (copies 1-3 deleted) before the long-tail
waves template off this port.
M4: test_supported_list_mirrors_track_v1_at_head pins supports_stop /
supports_reasoning against XAIChatConfig.get_supported_openai_params for
EVERY xai chat model in the map at HEAD, plus the params v2 emits
unconditionally staying in v1's supported list.
F1 (verifier, refutes a report claim): v1 FORWARDS a stream refusal that
rides a role/content delta (only refusal-only deltas are swallowed); the
parser now forwards it verbatim when the wire key is present; pinned by
the refusal_rides_content_deltas two-sided row. The false 'wrapper drops
refusal' claim is corrected in code comments and the report.
F2 (verifier): folded usage attaches ONLY to the choices:[] tail; v1's
wrapper strips usage from every emitted content/finish chunk; pinned by
usage_withheld_on_content_chunks (the fold still runs, so uncoercible
values stay loud).
N1: _contains_strict_key fails CLOSED at the recursion cap. N2: inbound
fold docstrings cover the xai dialect. N4: Block import at module top.
N5: the xai/-prefix capability trap is asserted, not just narrated.
Differential report regenerated: 336 IDENTICAL / 78 FALLBACK / 0 divergent.
2026-06-12 09:18:50 +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.