litellm/tests/test_litellm
Krish Dholakia 4be0ec8e35
GA Multi-instance rate limiting v2 Requirements + New - specify token rate limit type - output / input / total (#11646)
* feat(parallel_request_limiter_v3.py): allows admin to enforce token rate limit based on just output tokens

Useful when trying to rate limit for primarily self hosted model use-cases

* test(test_parallel_request_limiter_v3.py): add unit test for token rate limit type

* feat(parallel_request_limiter_v3.py): return remaining token limits in header

* feat: return rate limit headers in response

* feat(parallel_request_limiter_v3.py): working rate limit response headers

* feat(parallel_request_limiter_v3.py): fix rate limit tracking for tpm when rpm also set

* feat(parallel_request_limiter_v3.py): show headers for key/user/team

* feat(parallel_request_limiter_v3.py): decrement max parallel request limiter on failure event

* feat(parallel_request_limiter_v3.py): add in-memory cache implementation of parallel request rate limiter

allows rate limiter to work even without redis cache setup

Work for GA of parallel request limiter v3

* refactor(proxy/hooks/__init__.py): replace with new parallel request handler

* test: update testing

* fix: fix ruff check

* fix: revert ga of multi instance rate limiting - needs more work to pass testing
2025-06-11 22:05:13 -07:00
..
caching fix(redis_cache.py): support pipeline redis lpop for older redis vers… (#11425) 2025-06-05 00:05:54 -07:00
enterprise/enterprise_callbacks/send_emails
experimental_mcp_client
integrations update GCSBucketBase to handle GSM project ID if passed (#11409) 2025-06-04 10:02:26 -07:00
litellm_core_utils fix(internal_user_endpoints.py): support user with + in email on us… (#11601) 2025-06-10 22:13:10 -07:00
llms Enable System Proxy Support for aiohttp Transport (#11616) 2025-06-11 21:13:37 -07:00
passthrough build(VLLM-Passthrough-with-loadbalancing-support-(enables-using-model-list-for-VLLM-/classify-endpoint)): Closes #11205 2025-05-31 09:00:04 -07:00
proxy GA Multi-instance rate limiting v2 Requirements + New - specify token rate limit type - output / input / total (#11646) 2025-06-11 22:05:13 -07:00
responses [Bug Fix] Fix: _transform_responses_api_content_to_chat_completion_content` doesn't support file content type (#11494) 2025-06-06 13:20:46 -07:00
router_strategy Simplify experimental multi-instance rate limiter - more accurate (#11424) 2025-06-07 11:10:55 -07:00
router_utils/pre_call_checks
secret_managers fix(secret-managers): Break AzureCredentialType restriction on AZURE_CREDENTIAL (#11272) 2025-05-31 01:03:08 -07:00
types fix(utils.py): support non default params for audio transcription (#11212) 2025-05-28 22:24:02 -07:00
vector_stores [Fix] QA Fixes - Vector Store Object Permissions (#11291) 2025-05-31 09:41:05 -07:00
__init__.py
conftest.py
log.txt
readme.md
test_constants.py
test_cost_calculator.py
test_logging.py
test_main.py fix: tests 2025-05-31 13:14:37 -07:00
test_router.py
test_utils.py Fix: Adds support for choosing the default region based on where the model is available (#11566) 2025-06-09 18:29:44 -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