fix: lower default streaming read timeout to 20s [AIR-1092]#597
Open
Cubestormer-IV wants to merge 2 commits into
Open
fix: lower default streaming read timeout to 20s [AIR-1092]#597Cubestormer-IV wants to merge 2 commits into
Cubestormer-IV wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
streamandstream_asyncin chat, fim, and agents inherited the global 300s timeout. For SSE streaming this becomes an httpx read timeout between chunks — a stalled stream hangs for 5 minutes before failing.Linear: AIR-1092
Implementation
Changed the hardcoded fallback from 300000 to 20000 (20s) in
stream/stream_asyncmethods only. Non-streaming (complete/complete_async) stay at 300s.The
x-speakeasy-timeoutextension was also added to the streaming operations in the dashboard OpenAPI spec (PR #41377), but local testing confirmed Speakeasy currently ignores per-operationx-speakeasy-timeout— all methods still fell back to 300000 after regeneration. This direct fix is needed until that's resolved upstream.Timeout priority remains: per-call
timeout_ms=>Mistral(timeout_ms=...)> per-operation default (now 20s for streaming).Checks / QA
chat.stream(...),fim.stream(...),agents.stream(...)time out after ~20s of silence rather than 5 minuteschat.complete(...)still uses 300s defaultclient.chat.stream(..., timeout_ms=60000)should use 60s