litellm/tests/test_litellm/proxy/pass_through_endpoints
devin-ai-integration[bot] 1fd04abb92
fix(responses): fall back on pre-output stream drops, fail truncated streams, honor request_timeout (#43133)
* fix(responses): fall back on pre-output stream drops, fail truncated streams, honor request_timeout

A native /v1/responses stream that drops before any output item now raises
the router's fallback-eligible MidStreamFallbackError, so configured
fallbacks retry the original input. A stream that ends with a clean EOF or
a [DONE] marker but no response.completed, response.incomplete or
response.failed event now raises litellm.APIConnectionError instead of
ending as if it had completed: fallback-eligible before any output, an
explicit error after partial output. The sync iterator mirrors every branch.

resolve_llm_passthrough_timeout now consults an explicitly set
litellm_settings.request_timeout right after the router timeout and before
general_settings.pass_through_request_timeout, so the router's native
responses path honors it.

* test(responses): give the normal-completion stream tests a terminal event

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-25 14:32:41 -07:00
..
llm_provider_handlers chore(cost-map): remove models past their deprecation date (#42435) 2026-09-22 21:19:26 +00: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_deepgram_ws_passthrough_routes.py fix(deepgram): forward only the first model and language values to /listen 2026-09-18 21:29:29 +00:00
test_llm_pass_through_endpoints.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_managed_id_rewriter.py fix(passthrough): recognize CR-only SSE frame delimiters when minting streamed managed ids 2026-08-26 01:36:18 -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(responses): fall back on pre-output stream drops, fail truncated streams, honor request_timeout (#43133) 2026-09-25 14:32:41 -07:00
test_passthrough_auth_default.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_passthrough_endpoint_router.py feat(proxy): add Azure AI Speech pass-through route 2026-09-17 03:03:19 +00:00
test_passthrough_endpoints_common_utils.py test(aws): type the new partition test parameters 2026-08-29 02:27:18 -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 test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_passthrough_post_call_guardrails.py fix(guardrails): remove the module-global translation mapping that leaked between tests 2026-09-03 03:28:52 -07:00
test_streaming_handler.py fix(proxy): run the remaining inline token counts off the event loop 2026-09-08 18:42:38 +00:00
test_streaming_handler_interrupt.py feat(proxy): add TinyFish Agent API passthrough with per-step billing (#41099) 2026-09-21 21:21:43 -07:00
test_upstream_usage_headers.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_vertex_ai_batch_passthrough.py chore(cost-map): remove models past their deprecation date (#42435) 2026-09-22 21:19:26 +00:00
test_vertex_passthrough_load_balancing.py test(passthrough): cover Vertex router resolution without a matching deployment 2026-09-15 22:14:44 +00:00
test_watsonx_proxy_route.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00