Repository navigation
fix(client): default SSE Accept headers - #48779
DEAN-Cherry wants to merge 2 commits into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The issue already exists as #48771, and the PR description already contains This appears to be a non-default-branch edge case: this PR correctly targets I tried the supported |
|
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:
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. |
|
Could a maintainer please reconsider reopening this PR? I'm experiencing the same issue on Windows with Kaspersky Endpoint Security and OpenCode 2.1.4. Both the CLI and Desktop repeatedly lose their SSE connections:
This makes OpenCode 2.x practically unusable on my machine. The proposed This PR was closed by automated cleanup rather than a failed technical review. Could it please be reopened and considered for the current v2 release? There also appears to be an issue-linking problem with #48771, as documented by the PR author. Thank you! |
|
I'd like to confirm that this fix works in practice on Windows with Kaspersky Endpoint Security enabled. We encountered persistent SSE connection failures after upgrading OpenCode from 2.0.6 to 2.1.4. Symptoms:
We applied the fix from this PR to OpenCode 2.1.4 and rebuilt both the Windows CLI and Desktop. Results:
All of this was achieved without disabling Kaspersky or adding antivirus exclusions. This confirms that the missing Could a maintainer please reopen this PR, review it, and consider merging or porting the fix into the current release? The PR was closed by automated cleanup, not because the patch failed review. Given that this affects both CLI and Desktop, I believe it deserves another look. Thanks to @DEAN-Cherry for identifying the root cause and providing the fix! |
Port anomalyco#48779 to current dev. Preserve the current client runtime, regenerate from the generator, and update the integration test for server.info and experimental.session.log. Original commits: 4aae4ef and 75b117d.
Issue for this PR
Closes #48771
Type of change
What does this PR do?
Default generated Promise SSE requests to
Accept: text/event-streamwhen no explicit Accept header is present. This avoids the first-response buffering observed with Kaspersky while preserving client, endpoint, and per-request header overrides.The change is in the shared generator runtime, with the client regenerated so both
event.subscribeandsession.loguse it. Non-SSE requests are unchanged.How did you verify your code works?
packages/httpapi-codegen: 97 tests passed, including the emitted default and explicit-header overrides.packages/client/test/promise.test.ts: 37 tests passed; client build andcheck:generatedpassed.Screenshots / recordings
Not applicable: HTTP request-header change.
Checklist