mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-02 02:11:58 +00:00
* feat(proxy): gzip buffered responses for clients that accept it Large JSON reads like /user/daily/activity/aggregated shipped tens of MB uncompressed. Compress single-message bodies of 500B or more when the client's Accept-Encoding allows gzip (q-values and the wildcard honored). Streamed and etagged responses pass through untouched, every negotiable response carries Vary: Accept-Encoding, and bodies of 1MB or more are compressed in a worker thread * fix(proxy): skip partial and no-transform responses in gzip and always release the held start The gzip gate now also skips 206 Partial Content and Cache-Control: no-transform, since compressing either breaks byte ranges or ignores an explicit ban on transforms. A response start without a headers key no longer raises, and a start the app never follows with a body message is forwarded when the app returns instead of being dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_admission_control_middleware.py | ||
| test_billable_request_metrics_middleware.py | ||
| test_budget_reservation_release_middleware.py | ||
| test_gzip_middleware.py | ||
| test_in_flight_requests_middleware.py | ||
| test_per_request_root_path_middleware.py | ||
| test_prometheus_auth_middleware.py | ||
| test_prometheus_auth_middleware_asgi.py | ||
| test_request_size_limit_middleware.py | ||
| test_security_headers_middleware.py | ||