Skip to content

test(vercel-ai): Cover streamText with tools on a real provider - #26440

Draft
sentry-junior[bot] wants to merge 1 commit into
developfrom
test/vercelai-real-provider-stream-tools
Draft

sentry-junior[bot] wants to merge 1 commit into
developfrom
test/vercelai-real-provider-stream-tools

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

What

Adds a node integration scenario that runs streamText with tools through @ai-sdk/openai (Responses API, fake SSE fetch, no network) with tracing sampled and unsampled. The caller must get the streamed text, and the model and tool spans must be recorded.

Why

ai 7.0.168–7.0.173 broke this call with ReadableStream is locked whenever Sentry was loaded (#26403). Our existing scenarios use MockLanguageModelV3, which sends no request body, so ai never makes the redacted result copy that triggers the bug. @ai-sdk/openai attaches a telemetry redactor to the body when tools are sent, so it does.

Blocked on ai 7.0.174. The suite pins ai: '^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]

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>
@github-actions

Copy link
Copy Markdown
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.

Path Size % Change Change
@sentry/browser 30.1 kB - -
@sentry/browser - with treeshaking flags 28.3 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.2 kB - -
@sentry/browser (incl. Tracing) 52.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.25 kB - -
@sentry/browser (incl. Tracing, Replay) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.6 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.6 kB - -
@sentry/browser (incl. Feedback) 47.73 kB - -
@sentry/browser (incl. sendFeedback) 30.69 kB - -
@sentry/browser (incl. FeedbackAsync) 35.69 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.71 kB - -
@sentry/browser (incl. Metrics & Logs) 32.37 kB - -
@sentry/react 32.11 kB - -
@sentry/react (incl. Tracing) 54.95 kB - -
@sentry/vue 38.3 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 30.12 kB - -
@sentry/remix (Remix 3 client bundle) 58.06 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 52.7 kB - -
CDN Bundle (incl. Logs, Metrics) 34.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.09 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.69 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.45 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.44 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.61 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.02 kB - -
@sentry/nextjs (client) 58.57 kB - -
@sentry/sveltekit (client) 53.57 kB - -
@sentry/core/server 44.8 kB - -
@sentry/core/browser 14.4 kB - -
@sentry/node 151.36 kB -0.01% -11 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.3 kB - -
@sentry/node - without tracing 88.56 kB -0.01% -5 B 🔽
@sentry/node - without channel injection 140.3 kB -0.01% -6 B 🔽
@sentry/aws-serverless 98.93 kB -0.01% -6 B 🔽
@sentry/cloudflare (withSentry) - minified 206.47 kB - -
@sentry/cloudflare (withSentry) 479.22 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 231.83 kB - -

View base workflow run

@RulaKhaled RulaKhaled self-assigned this Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant