litellm/tests/test_litellm
Claude aa86fd8327
refactor(sail): validate completion_window while mapping params, like other providers
Sail checked the caller's completion window while building the request body,
which for chat runs inside OpenAIChatCompletion's try block. That needed a
Sail-only carve-out in openai.py so UnsupportedParamsError was not rewrapped.

Validation now happens where every provider validates its params, in
map_openai_params: service_tier (unchanged) and the Responses API's top-level
metadata.completion_window. extra_body is an unvalidated passthrough on every
endpoint, as it is for every other provider, so a bad window there reaches
Sail and Sail's own 400 is relayed. The openai.py carve-out is removed and the
file matches main again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rFsPGWXKJRcmChhoP9DDY
2026-09-25 12:13:13 -07:00
..
caching fix(caching): propagate auth cache invalidation over Redis Cluster via a node-level pub/sub client (#43110) 2026-09-25 07:56:46 -07:00
expected_fine_tuning_api
expected_responses_api_request
integrations chore: merge main into litellm_add_sail_provider 2026-09-25 17:15:26 +00:00
interactions test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
litellm_core_utils chore: merge main into litellm_add_sail_provider 2026-09-25 17:15:26 +00:00
llms refactor(sail): validate completion_window while mapping params, like other providers 2026-09-25 12:13:13 -07:00
ocr test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
passthrough test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
proxy fix(proxy): give SpendLogToolIndex its own share of the cleanup budget and log a per-run summary (#41768) 2026-09-25 09:40:20 -07:00
responses test(sail): add unit regression coverage for the Sail provider PR 2026-09-24 16:48:34 +00:00
router_strategy test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
router_utils fix(router): match provider-prefixed fallback keys for bare model groups served by wildcard deployments (#43062) 2026-09-24 18:08:56 -07:00
rust_bridge feat(rust): hand upstream response headers to the native Messages stream (#43178) 2026-09-25 10:03:15 -07:00
secret_managers fix(aws_secret_manager_v2): restore secret scheduled for deletion instead of failing CreateSecret (#42454) 2026-09-22 14:12:20 -05:00
__init__.py
conftest.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
log.txt
readme.md
test_compression.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
test_conftest.py
test_main.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -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