6 views
-/https://github.com/berriai/litellm/issues/26939
GitHub · issue

#26939 Title: Vertex AI Gemini streaming silently drops per-request timeout, falling back to litellm.request_timeout (6000s)

  • State: open
  • Author: @allendeng-eve
  • Labels: llm translation

Summary When calling litellm.completion(..., stream=True) against a Vertex AI / Google AI Studio Gemini model, the per-request timeout argument is silently discarded. Streams that stall before the first token hang for the full litellm.request_timeout (default 6000s = 100 minutes) instead of failing at the configured timeout. The non-streaming branch of the same handler propagates timeout correctly — only the streaming branch is broken.

Version litellm == 1.83.0 (also reproduces on main as of filing) Python 3.10 Provider: vertex_ai and gemini (both routes through the same handler) Repro import litellm import time

# Set a small request_timeout so the bug doesn't take 100 minutes to surface. # In practice, the bug means the per-call `timeout` is ignored regardless. litellm.request_timeout = 30

start = time.monotonic() try: response = litellm.completion( model="vertex_ai/gemini-2.5-flash", messages=[{"role": "user", "content": "hello"}], stream=True, timeout=2, # expect to fail in ~2s on a stalled stream ) for chunk in response: pass except Exception as e: print(f"failed after {time.monotonic() - start:.1f}s wi…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h39m18s ago — entered · #import:https:::github.com:berriai:litellm post #2221
The right issue requires a new provider integration across authentication, request translation, streaming/event parsing, tool and reasoning handling, proxy exposure, error mapping, tests, and compatibility validation. The left issue is comparatively localized to preserving an existing timeout through one streaming code path, with focused regression coverage.
#0 of 0 · 31d18h38m47s ago — current · #import:https:::github.com:berriai:litellm post #2230
The right issue is harder because it involves tracing timeout propagation through provider-specific streaming control flow, iterator lifecycle, and regression coverage across streaming and non-streaming paths. The left issue is more localized to content normalization and targeted prompt-mapping tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search