You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tests(agent): cover the OpenAI batch request bound - #177
Introduces an idle timeout on OpenAI-compatible stream reads that resets on each received line. This prevents endpoints that hold connections open without emitting [DONE] or closing from stalling indefinitely while preserving support for late usage chunks.
Thanks @AdamMagued — the diagnosis was right, and the fix landed separately while this PR was open: #178 (rebase-merged as 49964e2) added the idle bound,
the per-line watchdog reset and the named cancel cause — the code half of #176, which is now closed.
What this diff still added is TestOpenAIBatchTimesOutOnSilentEndpoint, which master lacked: openAIRequestTimeout had no test at all, while its Ollama counterpart
(TestOllamaBatchTimesOutOnSilentEndpoint) did.
Landing: squash-merged as a6b86c8 with the subject reworded to tests(agent): … (the change is
test-only) rather than rebase-merging 7222e40, whose message describes code that is already in master.
The merged commit is attributed to your account.
Two follow-ups found while reviewing this area, both filed with measured repros:
#185 — a healthy long stream is still cut by the
client-wide 120 s timeout (http.Client.Timeout covers the body read; Ollama's client has no timeout).
#186 — the idle bound cannot fire under the default
settings, because the request bound is the same 120 s and the watchdog is reset by every line, so the
reader gets Client.Timeout exceeded … instead of stream went silent.
Both are open and unassigned. FYI, minor: your own commit 7222e40 carries adammaged8@gmail.com,
which is not connected to your GitHub account, so commits authored with that address do not link to your
profile — the squash commit above used your account identity, so this one is already credited.
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
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.
Resolves #176
Introduces an idle timeout on OpenAI-compatible stream reads that resets on each received line. This prevents endpoints that hold connections open without emitting [DONE] or closing from stalling indefinitely while preserving support for late usage chunks.