litellm/tests/test_litellm/proxy/pass_through_endpoints
Tin Chi Lo 970ea2949e fix(vertex): decide rawPredict passthrough streaming from the request body
Vertex passthrough classified any target URL containing "stream" as a streaming
request. `:streamRawPredict` carries that substring, so a unary Claude-on-Vertex
call whose body omits `stream` was routed through the streaming logging path.
That path never consults the response content-type, so a complete
`"type": "message"` JSON body was handed to the Anthropic SSE chunk parser,
which recognises none of it; the spend log recorded 0 prompt tokens,
0 completion tokens and zero cost

Streaming for the rawPredict family now comes from the request body, which is
what the Anthropic Messages contract uses for those endpoints. The
generateContent family keeps its URL signal because the Gemini REST body has no
`stream` field, and `?alt=sse` is still appended for every request that is
classified as streaming, so Gemini framing and its usage parsing are unchanged

Both passthrough streaming predicates read `.get("stream")` off a body that is
only annotated as a dict; `_read_request_body` returns whatever the JSON parser
produced, so an array body raised AttributeError. The two predicates are now one
owner that answers False for any non-object body, which covers the vertex,
mistral, anthropic, vllm and azure passthrough routes
2026-07-25 18:09:29 -07:00
..
llm_provider_handlers fix(passthrough,streaming): recover cost on interrupted and agentic Anthropic streams (#31035) 2026-06-22 18:51:13 -07:00
test_carry_guardrail_logging_info.py fix(passthrough): emit otel guardrail span when a guardrail blocks (#29470) 2026-06-02 11:46:25 -07:00
test_llm_pass_through_endpoints.py fix(vertex): decide rawPredict passthrough streaming from the request body 2026-07-25 18:09:29 -07:00
test_method_specific_routing.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_pass_through_endpoints.py fix(passthrough): honor the zero fallback and aggregate-only TPM usage 2026-07-24 18:49:41 -07:00
test_passthrough_auth_default.py fix(passthrough): default auth=True; drop enterprise gate on the safe option 2026-04-29 23:10:59 +00:00
test_passthrough_endpoints_common_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_guardrail_block_otel_span.py fix: missing span for guardrail passthrough (#29552) 2026-06-03 01:25:15 +00:00
test_passthrough_guardrails.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_guardrails_field_targeting.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_post_call_guardrails.py fix(proxy): extend response headers hook to streaming, TTS, image gen, and pass-through (#24232) 2026-06-09 22:10:23 +02:00
test_streaming_handler_interrupt.py fix(streaming): stamp completion_start_time on first chunk for /v1/messages and /v1/responses (#32284) 2026-07-06 19:30:31 -07:00
test_upstream_usage_headers.py feat(passthrough): record upstream-reported cost and token usage 2026-07-24 18:10:15 -07:00
test_vertex_ai_batch_passthrough.py test(e2e): add live batches suite across providers and routing scenarios (#30958) 2026-07-02 08:05:23 -07:00
test_vertex_passthrough_load_balancing.py fix(proxy): Bedrock Knowledge Base pass-through: preserve SigV4 headers and signed request body (#27526) 2026-05-25 19:21:55 +05:30
test_watsonx_proxy_route.py Litellm OSS Staging 010626 (#29422) 2026-06-01 21:42:51 -07:00