GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(provider): ignore SSE comment heartbeats for chunk timeout by 1052326311 · Pull Request #43607 · anomalyco/opencode

Conversation

@1052326311

@1052326311 1052326311 commented Aug 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@1052326311
fix(provider): ignore SSE comment heartbeats for chunk timeout
b9234e3
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@1052326311

1052326311 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neriousy neriousy mentioned this pull request Aug 20, 2026
fix(core): ignore SSE comment heartbeats #43618
Merged
1052326311 added 2 commits August 21, 2026 12:13
@1052326311
test(provider): validate SSE timeout error
0ffeeb9
@1052326311
test(provider): return after closed timeout stream
8de252f
@1052326311

1052326311 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

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.

All reactions

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
@renekris
fix(opencode): provider stream reliability (ports of upstream anomaly…
ebc1594
…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
fix(app): recover SSE after mobile app resume #44903
Closed
fix(provider): handle SSE reader cancel rejections #44912
Closed
@totalolage totalolage mentioned this pull request Sep 6, 2026
fix(provider): enforce chunk timeout regardless of content type #47621
Closed
3 tasks done
@github-actions github-actions Bot mentioned this pull request Sep 9, 2026
fix(ai): honor chunkTimeout on HTTP SSE streams #48158
Closed
3 of 6 tasks
@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Sep 20, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

automated-pr-cleanup

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

chunkTimeout resets on SSE comment heartbeats — keepalive-warm stalled streams never time out

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@1052326311
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.