Repository navigation
test(e2e): Drop OpenRouter's [DONE] frame in the Anthropic test app - #25594
Merged
Merged
Conversation
The `(latest)` variant of `node-anthropic-send-to-sentry` fails on the streaming tests. OpenRouter ends each stream with an OpenAI-style `event: data` / `data: [DONE]` frame, which is not part of Anthropic's protocol. Up to 0.135.0, `@anthropic-ai/sdk` parsed only known event names and ignored this frame. Since 0.136.0 it parses every named event as JSON, so the frame makes it throw. The test app now gives the client a `fetch` wrapper that removes the `[DONE]` frame from event streams. The test keeps the newest SDK, and the pinned variant still passes. Pinning the latest variant to 0.135.0 would also work, but it would stop the test from tracking new SDK releases. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
Another valid approach would be to pin the SDK to 0.135.0 and report the issue upstream, but I figure the whole point of the |
nicohrubec
approved these changes
Oct 21, 2026
nicohrubec
left a comment
Member
There was a problem hiding this comment.
There is an upstream docs issue that seems relevant but no replies so far: OpenRouterTeam/docs#1
I agree that it's better to work around this failure instead of pinning
51 tasks
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.
The
(latest)variant ofnode-anthropic-send-to-sentryfails on the streaming tests. OpenRouter ends each stream with an OpenAI-styleevent: data/data: [DONE]frame, which is not part of Anthropic's protocol. Up to 0.135.0,@anthropic-ai/sdkparsed only known event names and ignored this frame. Since 0.136.0 it parses every named event as JSON, so the frame makes it throw.The test app now gives the client a
fetchwrapper that removes the[DONE]frame from event streams. The test keeps the newest SDK, and the pinned variant still passes. Pinning the latest variant to 0.135.0 would also work, but it would stop the test from tracking new SDK releases.