litellm/tests/test_litellm
shrey-berri 44792295f0
Some checks failed
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
perf(spend): stop the session count once it passes the cap
The session view's total came from grouping every row in the date window,
even though it is capped at 10,000. It now counts sessions from the newest
rows of the window and stops once it has seen more than the cap, so a window
with many sessions is no longer read to the end. Windows whose sessions are
too long to settle within 200,000 rows still use the grouped count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015S4LA6NcP6gp22R1iwH6xw
2026-09-27 01:07:33 +00:00
..
proxy perf(spend): stop the session count once it passes the cap 2026-09-27 01:07:33 +00:00
__init__.py
conftest.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
readme.md
test_conftest.py

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