Skip to content

ref(vercel-ai)!: Move Vercel AI integration to @sentry/server-utils - #22964

Draft
nicohrubec wants to merge 1 commit into
ref/move-ai-langchain-langgraph-2from
ref/move-ai-vercel-ai-2
Draft

ref(vercel-ai)!: Move Vercel AI integration to @sentry/server-utils#22964
nicohrubec wants to merge 1 commit into
ref/move-ai-langchain-langgraph-2from
ref/move-ai-vercel-ai-2

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

Move the Vercel AI gen-ai instrumentation from @sentry/core to @sentry/server-utils/src/ai/vercel-ai, consuming the shared ai/core base. This is the last provider move. The public helpers (addVercelAiProcessors, getProviderMetadataAttributes) and the _INTERNAL_* tool-call-context symbols are re-exported from @sentry/server-utils; cloudflare/deno/vercel-edge consume them from there, so the platform SDK public API is unchanged.

The existing src/vercel-ai/ diagnostics-channel subscriber layer (already in server-utils) now imports the moved provider code from ../ai/vercel-ai and ../ai/core/utils instead of @sentry/core.

With both vercel-ai and workers-ai now in server-utils, vercel-ai re-couples to ../workers-ai/constants directly — the temporary string inline that lived in core's vercel-ai copy is gone with the deleted file.

As with the other providers, vercel-edge re-exports from @sentry/server-utils/no-diagnostic-channels to keep the edge build free of node:diagnostics_channel.

The shared @sentry/server-utils test client mock is reintroduced now that 7 server-utils test files need a full client (matching how @sentry/core shares one across ~40 tests).

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.91 kB -0.02% -5 B 🔽
@sentry/browser - with treeshaking flags 28.11 kB -0.02% -4 B 🔽
@sentry/browser (incl. Tracing) 47.35 kB -0.02% -5 B 🔽
@sentry/browser (incl. Tracing + Span Streaming) 47.36 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Profiling) 52.13 kB -0.01% -5 B 🔽
@sentry/browser (incl. Tracing, Replay) 86.69 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.13 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 91.41 kB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 104.05 kB -0.01% -5 B 🔽
@sentry/browser (incl. Feedback) 47.22 kB -0.02% -5 B 🔽
@sentry/browser (incl. sendFeedback) 34.76 kB -0.02% -5 B 🔽
@sentry/browser (incl. FeedbackAsync) 39.86 kB -0.02% -6 B 🔽
@sentry/browser (incl. Metrics) 30.99 kB -0.02% -5 B 🔽
@sentry/browser (incl. Logs) 31.22 kB -0.02% -4 B 🔽
@sentry/browser (incl. Metrics & Logs) 31.89 kB -0.02% -4 B 🔽
@sentry/react 31.73 kB -0.02% -5 B 🔽
@sentry/react (incl. Tracing) 49.61 kB -0.01% -3 B 🔽
@sentry/vue 34.98 kB -0.03% -7 B 🔽
@sentry/vue (incl. Tracing) 49.34 kB -0.02% -5 B 🔽
@sentry/svelte 29.94 kB -0.02% -5 B 🔽
CDN Bundle 32 kB -0.02% -6 B 🔽
CDN Bundle (incl. Tracing) 47.72 kB -0.02% -6 B 🔽
CDN Bundle (incl. Logs, Metrics) 33.55 kB -0.02% -4 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 49.08 kB -0.02% -7 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 72.89 kB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay) 85.35 kB -0.01% -7 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.65 kB -0.01% -7 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.14 kB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.45 kB -0.01% -7 B 🔽
CDN Bundle - uncompressed 95.5 kB -0.03% -24 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 143.08 kB -0.02% -24 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.21 kB -0.03% -24 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.06 kB -0.02% -24 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.97 kB -0.02% -24 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.34 kB -0.01% -24 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.3 kB -0.01% -24 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.04 kB -0.01% -24 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280 kB -0.01% -24 B 🔽
@sentry/nextjs (client) 52.2 kB -0.01% -4 B 🔽
@sentry/sveltekit (client) 47.8 kB -0.02% -8 B 🔽
@sentry/core/server 66.85 kB -16.45% -13.16 kB 🔽
@sentry/core/browser 51.96 kB -0.02% -9 B 🔽
@sentry/node 120.84 kB -0.04% -46 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.26 kB -0.01% -4 B 🔽
@sentry/aws-serverless 92.92 kB -0.02% -16 B 🔽
@sentry/cloudflare (withSentry) - minified 219.34 kB -0.02% -24 B 🔽
@sentry/cloudflare (withSentry) 540.48 kB +0.01% +10 B 🔺

View base workflow run

Move the Vercel AI gen-ai instrumentation from `@sentry/core` to
`@sentry/server-utils/src/ai/vercel-ai`, consuming the shared `ai/core` base. This is
the last provider move. The public helpers (`addVercelAiProcessors`,
`getProviderMetadataAttributes`) and the `_INTERNAL_*` tool-call-context symbols are
re-exported from `@sentry/server-utils`; cloudflare/deno/vercel-edge consume them from
there, so the platform SDK public API is unchanged.

The existing `src/vercel-ai/` diagnostics-channel subscriber layer now imports the moved
provider code from `../ai/vercel-ai` and `../ai/core/utils` instead of `@sentry/core`.
With both vercel-ai and workers-ai now in server-utils, vercel-ai re-couples to
`../workers-ai/constants` directly (the temporary inline in core's copy is gone with the
deleted file).

As with the other providers, `vercel-edge` re-exports from
`@sentry/server-utils/no-diagnostic-channels` to keep the edge build free of
`node:diagnostics_channel`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from 7c9b5e7 to 090d6a4 Compare August 3, 2026 15:37
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