mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Replace the reqwest client-level .timeout() (which caps total request time and kills active streams) with a per-chunk timeout on response body reading. A stalled connection (no data for >chunk_timeout) is retried and eventually errors, while a slow-but-progressing response can run indefinitely. - Remove client .timeout(), keep .connect_timeout(llm_timeout) - Add chunk_timeout field to Llm struct, enforced via tokio::time::timeout on each stream.chunk() poll - Stall triggers retry (transport-class), surfaces clear error on exhaustion - New config: SPROUT_AGENT_LLM_STREAM_CHUNK_TIMEOUT_SECS (default 120) - Keepalive already emitted during LLM calls (Phase 1) keeps ACP idle clock alive during long streams - Tests: stalled body timeout + slow-but-progressing success Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>