Repository navigation
test(vercel-ai): Cover streamText with tools on a real provider - #26440
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
ai 7.0.168-7.0.173 broke streamText with tools once Sentry was loaded (ReadableStream is locked). Our scenarios use MockLanguageModelV3, which sends no redactable request body, so they never hit it. This drives @ai-sdk/openai over a fake SSE fetch instead, sampled and unsampled. Refs #26403 Co-Authored-By: Rola Abuhasna <rola.abuhasna@sentry.io>
Contributor
size-limit report 📦Compared: 940acab (PR test merge using develop at b0d77ee) Against: b0d77ee (develop) · base run #66346 ✅ Baseline matches: this diff contains only this PR's changes.
|
This branch has not been deployed
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.
What
Adds a node integration scenario that runs
streamTextwith tools through@ai-sdk/openai(Responses API, fake SSEfetch, no network) with tracing sampled and unsampled. The caller must get the streamed text, and the model and tool spans must be recorded.Why
ai7.0.168–7.0.173 broke this call withReadableStream is lockedwhenever Sentry was loaded (#26403). Our existing scenarios useMockLanguageModelV3, which sends no request body, soainever makes the redacted result copy that triggers the bug.@ai-sdk/openaiattaches a telemetry redactor to the body when tools are sent, so it does.Blocked on
ai7.0.174. The suite pinsai: '^7.0.174', the first release with the upstream fix (vercel/ai#25135, release tracked in vercel/ai#25061). No published version matches that range yet, so keep this a draft until 7.0.174 is on npm.Refs #26403
via Rola Abuhasna.
--
View Session [Sentry]