mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
The passthrough helper copied the upstream provider's Server: header (e.g. "cloudflare" from Anthropic) onto the FastAPI response. uvicorn then added its own Server: header on top, producing two Server: lines in the wire response. Strict HTTP parsers (aiohttp's, used in CI's passthrough tests) reject this with "Duplicate 'Server' header found" and the request fails with a 400. Same risk for Date, Content-Length, Connection, Keep-Alive: the ASGI server writes its own copy at serialization time. Forwarding the upstream's value either duplicates the header or lies about the re-serialized body length. Drop these from the forwarded set. Application/business headers (content-type, x-request-id, anthropic-ratelimit-*, etc.) still pass through unchanged. |
||
|---|---|---|
| .. | ||
| llm_provider_handlers | ||
| test_llm_pass_through_endpoints.py | ||
| test_method_specific_routing.py | ||
| test_pass_through_endpoints.py | ||
| test_passthrough_endpoints_common_utils.py | ||
| test_passthrough_guardrails.py | ||
| test_passthrough_guardrails_field_targeting.py | ||
| test_vertex_ai_batch_passthrough.py | ||
| test_vertex_passthrough_load_balancing.py | ||