litellm/tests/unit/proxy/middleware
Renn F 74febbea64
feat(proxy): add optional fastapi-guard security middleware
Off by default (LITELLM_GUARD_ENABLED=true to enable): IP block/allow
lists, rate limiting with auto-ban, user-agent blocking, penetration
detection, passive mode, and optional Redis-backed shared state. Pure
ASGI (house style); the flag is read lazily per request so YAML
environment_variables entries are honored. No dependency change: the
import is lazy and errors with install guidance when the flag is on
without the package.
2026-10-11 00:12:08 +02:00
..
__init__.py ci: move tests/proxy_unit_tests to tests/unit/proxy and run the proxy-db shards from litellm-tests (#42903) 2026-09-24 22:59:11 +00:00
test_admission_control_middleware.py feat(proxy): embed enterprise LiteAdmin MCP in LiteLLM images (#44610) 2026-10-05 15:24:34 -07:00
test_billable_request_metrics_middleware.py feat(proxy): track failed requests by HTTP status and caller (#45244) 2026-10-09 14:27:56 -07:00
test_budget_reservation_release_middleware.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00
test_guard_middleware.py feat(proxy): add optional fastapi-guard security middleware 2026-10-11 00:12:08 +02:00
test_gzip_middleware.py perf(ci): isolate and shard integration suites (#44146) 2026-10-10 11:15:19 -07:00
test_in_flight_requests_middleware.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00
test_per_request_root_path_middleware.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00
test_prometheus_auth_middleware.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00
test_prometheus_auth_middleware_asgi.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00
test_request_size_limit_middleware.py ci: move tests/proxy_unit_tests to tests/unit/proxy and run the proxy-db shards from litellm-tests (#42903) 2026-09-24 22:59:11 +00:00
test_security_headers_middleware.py test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy (#44015) 2026-10-01 18:23:31 +00:00