The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs(proxy): pre-fix passthrough streams omitted content-type, not octet-stream
mateo-berrid5a4c145778a
diff --git a/litellm/proxy/common_request_processing.py b/litellm/proxy/common_request_processing.pyindex 165e58c56f7..376d7785e5a 100644--- a/litellm/proxy/common_request_processing.py+++ b/litellm/proxy/common_request_processing.py@@ -2502,8 +2502,9 @@ class ProxyBaseLLMRequestProcessing:buffered (guardrail-rewritten) and the unbuffered relay paths soclients that enforce the event-stream content-type (e.g. Claude Code onBedrock invoke-with-response-stream) see the correct header instead of- Starlette's application/octet-stream default. Returns None for providers- with no event-stream media type, leaving the response default unchanged.+ no content-type at all, which they fall back to reading as+ application/octet-stream. Returns None for providers with no+ event-stream media type, leaving the response headers unchanged."""from litellm.llms.pass_through.guardrail_translation.handler import (LlmPassthroughRouteHandler,diff --git a/tests/test_litellm/proxy/test_common_request_processing.py b/tests/test_litellm/proxy/test_common_request_processing.pyindex e567d19dac7..ddb7b0d510f 100644--- a/tests/test_litellm/proxy/test_common_request_processing.py+++ b/tests/test_litellm/proxy/test_common_request_processing.py@@ -4516,9 +4516,9 @@ class TestAllmPassthroughStreamingProviderGate:"""Regression for LIT-4561. The unbuffered Bedrock event-stream relay(invoke-with-response-stream, no post-call guardrail rewriting) must set- content-type: application/vnd.amazon.eventstream instead of leaving it to- Starlette's application/octet-stream default, which trips Claude Code's- content-type guard added in 2.1.208+ content-type: application/vnd.amazon.eventstream instead of emitting no+ content-type header at all, which trips Claude Code's content-type guard+ added in 2.1.208"""processing_obj = self._build_processing_obj("bedrock", "model/us.anthropic.claude-sonnet-4-20250514-v1:0/invoke-with-response-stream"