litellm/tests/unit/proxy/proxy_server
kenneth-berri 66b923b51d
feat(proxy): let operators omit x-litellm-* response headers (#52949)
* feat(proxy): optionally omit LiteLLM response headers across HTTP paths

Signed-off-by: Jaeyeon Kim <anencore94@gmail.com>

* fix(proxy): preserve typed headers without rebinding messages

Signed-off-by: Jaeyeon Kim <anencore94@gmail.com>

* refactor(proxy): inject the header opt-out setting into the middleware

* fix(proxy): apply the header opt-out to unhandled 500 responses

The unhandled exception handler runs outside the middleware stack, so its x-litellm-call-id header was not filtered. Also type the middleware test.

* refactor(proxy): share one typed header opt-out check

A named function replaces the lambda so the type gate stays at its merge-base count, and the 500 handler filters raw headers in place.

---------

Signed-off-by: Jaeyeon Kim <anencore94@gmail.com>
Co-authored-by: Jaeyeon Kim <anencore94@gmail.com>
2026-11-19 15:27:34 -08:00
..
.coverage_baseline
__init__.py
_coverage_check.py
_pin_check.py
conftest.py fix(proxy): release request bodies of failed calls without waiting for a full GC (#52600) 2026-11-19 00:50:33 +00:00
test_background_health.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
test_exception_handlers.py feat(proxy): let operators omit x-litellm-* response headers (#52949) 2026-11-19 15:27:34 -08:00
test_harness_smoke.py
test_lifecycle.py fix(proxy/auth): return 401 for a non-master key when no database is configured (#52349) 2026-11-17 14:19:09 -08:00
test_openapi_customization.py refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
test_proxy_config.py fix(proxy): make credential reload sync linear in the number of credentials (#52305) 2026-11-17 12:24:24 -08:00
test_routes_anthropic_beta.py
test_routes_assistants.py fix(proxy): keep the mapped status on assistants and threads route errors (#44994) 2026-10-09 16:55:15 -07:00
test_routes_audio.py feat(tts)!: stream audio from the provider as it arrives on /v1/audio/speech (#46222) 2026-11-17 15:03:12 +00:00
test_routes_chat_completions.py fix(azure): drop the traceback from stream-cut errors sent to clients and alerts (#51760) 2026-11-14 08:00:58 +00:00
test_routes_completions.py fix(azure): drop the traceback from stream-cut errors sent to clients and alerts (#51760) 2026-11-14 08:00:58 +00:00
test_routes_config.py fix(ui): mark logging callbacks set in config.yaml and disable their delete (#52507) 2026-11-18 11:14:33 -08:00
test_routes_embeddings.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
test_routes_invitation.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
test_routes_login_sso.py test: fix flaky spend-log cleanup budget, login lockout, and wedged Redis tests (#47108) 2026-10-29 03:46:32 -07:00
test_routes_misc.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
test_routes_model_cost_map.py refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust (#50501) 2026-11-10 02:37:35 +00:00
test_routes_model_info.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_routes_model_metrics.py
test_routes_models.py fix(proxy): serve Codex its own Bedrock catalog entries for Bedrock deployments (#50743) 2026-11-09 19:00:22 -08:00
test_routes_moderations.py fix(proxy): log each endpoint's own call type on failed audio, moderation, image, and rerank spend rows (#49684) 2026-11-02 23:57:11 +00:00
test_routes_onboarding.py
test_routes_queue.py fix(proxy): run baggage tag mappings and budget checks on /queue/chat/completions (#51753) 2026-11-14 08:54:54 -05:00
test_routes_threads.py fix(proxy): keep the mapped status on assistants and threads route errors (#44994) 2026-10-09 16:55:15 -07:00
test_routes_utils.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_spend_counters.py feat(budgets): replace the python budget hold and settle engine with a rust engine admitted at auth (#51535) 2026-11-15 16:03:51 -08:00
test_streaming_helpers.py fix(router): keep both errors when a streamed cross-group fallback also fails (#52217) 2026-11-16 22:04:16 -08:00
test_team_model_name_translation.py fix(proxy)!: price expanded wildcard /model/info rows as the model their calls route to (#49128) 2026-11-08 19:08:22 +00:00