Repository navigation
fix: no limit on response duration, only stall guards - #11
Merged
Merged
Conversation
The Gateway cut every response at five minutes: an absolute server write deadline, plus total-duration deadlines on provider requests. Healthy long answers and streams ended mid-response. - The server has no absolute write deadline. Each client read and write is bounded on its own (CLIENT_IO_TIMEOUT_SECONDS, default 60), in chunks of at most 32 KiB with the deadline refreshed on progress, so a long transfer that keeps moving is never cut. Request headers keep a 30 s limit. - Provider requests have no total deadline. They end only when the provider sends nothing, neither headers nor bytes, for PROVIDER_SILENCE_TIMEOUT_SECONDS (default 900). Keepalive bytes count as activity. Tinfoil's verified transport keeps its own client; only the wait for headers is bounded around it. - Both settings must be positive whole seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The Gateway cut every response at five minutes: an absolute server write deadline, plus total-duration deadlines on provider requests. Healthy long answers and streams ended mid-response.
Client side
CLIENT_IO_TIMEOUT_SECONDS, default 60 s). Transfers are split into chunks of at most 32 KiB and the deadline refreshes on progress, so a transfer that keeps moving is never cut. This also covers encrypted (EHBP) streams.Provider side
PROVIDER_SILENCE_TIMEOUT_SECONDS(default 900 s). Keepalive bytes count as activity.Both settings must be positive whole seconds; the Gateway refuses to start otherwise.
Compatibility
Tests
🤖 Generated with Claude Code