GeezerVison is showing github.com — fix(provider): ignore SSE comment heartbeats for chunk timeout by 1052326311 · Pull Request #43607 · anomalyco/opencode
Conversation
1052326311
commented
Aug 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Closes #43519
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
chunkTimeout currently restarts for every response body read. SSE comment frames such as : keepalive therefore prevent an otherwise stalled model stream from timing out. This keeps one deadline across reads and resets it only after a complete SSE event containing data:. Header timeouts and non-SSE responses are unchanged.
The regression uses the existing loopback OpenAI-compatible server: it sends one data event, then comment heartbeats every 20 ms. With a 50 ms timeout, the stream must produce the existing typed response-stream error.
How did you verify your code works?
- PR base:
3a31c4ea801915c0b050df4b3842997ea62b6e93
- Current head:
8de252f7aed6b8fc4d93a650be397fd385c7c433
- Provider timeout tests: 7 passed
- Package typecheck: passed
- Repository pre-push typecheck: 30/30 tasks passed
- Standards and compliance checks: passed
The upstream test, typecheck, and nix-eval workflows require maintainer approval for this fork head.
Screenshots / recordings
Not applicable; this is a provider timeout fix.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Current head b9234e31edc25d9f1334b27aaf9b4dd9c918484f is mergeable and the repository duplicate, standards, and compliance checks are green. The loopback SSE regression exercises the provider boundary without external credentials. Please review this exact head.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Follow-up head 8de252f7aed6b8fc4d93a650be397fd385c7c433 closes two exact-head validation gaps: the regression now handles the existing stream error part/throw behavior, and the deadline is narrowed safely for TypeScript. On the repository-pinned Bun 1.3.14, the provider timeout file passes 7/7; package typecheck and the pre-push repository typecheck (30/30 tasks) pass. Upstream test, typecheck, and nix-eval remain action_required pending maintainer approval.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
renekris
added a commit
to renekris/opencode-lowmem
that referenced
this pull request
Aug 22, 2026
…co#42150 anomalyco#42176 anomalyco#43881 anomalyco#43607)
- O(N) text/reasoning delta accumulation instead of O(N^2) string
concat (anomalyco#42150) — the lazy chunk buffer joins on read
- finish reason 'error' is set when a stream fails mid-flight (anomalyco#42176)
- clean-EOF empty provider streams retry like transient errors (anomalyco#43881),
narrowed from the upstream patch: only an attempt that produced no
text/reasoning delta and no tool call qualifies, so providers that
stream content but omit usage/finish are not retried into duplicate
output
- SSE comment heartbeats no longer reset the chunk timeout (anomalyco#43607);
the streaming TextDecoder handles multi-byte characters split across
reads (regression covered)
This was referenced Aug 25, 2026
|
Automated PR Cleanup
Thank you for contributing to opencode.
Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.
This PR was closed because it matched the following cleanup criteria:
- The PR was created more than 1 month ago
- The PR had fewer than 2 positive reactions
- Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR
PRs created within the last month are not affected by this cleanup.
If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.
Thanks again for taking the time to contribute.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|