Skip to content

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

Merged
nicohrubec merged 1 commit into
ref/move-ai-langchain-langgraph-2from
ref/move-ai-vercel-ai-2
Aug 4, 2026
Merged

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

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Aug 3, 2026

Copy link
Copy Markdown
Member

This moves the Vercel AI integration core logic from @sentry/core to @sentry/server-utils, dropping all exports except addVercelAiProcessors. 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.

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

With both Vercel AI and Workers AI now in server-utils, the last inlined WORKERS_AI_INTEGRATION_NAME copy (in the diagnostics-channel subscriber) is replaced by an import from ../ai/workers-ai/constants, so the constant is defined in exactly one place. Reintroduces the shared @sentry/server-utils test client mock now that several server-utils tests need a full client.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.81 kB - -
@sentry/browser - with treeshaking flags 28.03 kB - -
@sentry/browser (incl. Tracing) 47.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.05 kB - -
@sentry/browser (incl. Tracing, Replay) 86.6 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.04 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.33 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.97 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.66 kB - -
@sentry/browser (incl. FeedbackAsync) 39.77 kB - -
@sentry/browser (incl. Metrics) 30.88 kB - -
@sentry/browser (incl. Logs) 31.12 kB - -
@sentry/browser (incl. Metrics & Logs) 31.79 kB - -
@sentry/react 31.61 kB - -
@sentry/react (incl. Tracing) 49.54 kB - -
@sentry/vue 34.88 kB - -
@sentry/vue (incl. Tracing) 49.27 kB - -
@sentry/svelte 29.83 kB - -
CDN Bundle 31.9 kB - -
CDN Bundle (incl. Tracing) 47.6 kB - -
CDN Bundle (incl. Logs, Metrics) 33.45 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.02 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.81 kB - -
CDN Bundle (incl. Tracing, Replay) 85.26 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.57 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.4 kB - -
CDN Bundle - uncompressed 94.8 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.47 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.51 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.44 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.26 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.69 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.43 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.38 kB - -
@sentry/nextjs (client) 52.1 kB - -
@sentry/sveltekit (client) 47.72 kB - -
@sentry/core/server 66.74 kB -9.48% -6.99 kB 🔽
@sentry/core/browser 51.86 kB - -
@sentry/node 120.65 kB -0.42% -508 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 84.03 kB -0.01% -1 B 🔽
@sentry/aws-serverless 92.69 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 218.62 kB -2.49% -5.58 kB 🔽
@sentry/cloudflare (withSentry) 538.58 kB -2.32% -12.77 kB 🔽

View base workflow run

@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from 7c9b5e7 to 090d6a4 Compare August 3, 2026 15:37
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch 3 times, most recently from 04ae051 to a64bbcc Compare August 4, 2026 07:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a64bbcc. Configure here.

Comment thread packages/server-utils/src/ai/index.ts
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from a64bbcc to 21ca822 Compare August 4, 2026 07:45
@nicohrubec
nicohrubec marked this pull request as ready for review August 4, 2026 07:46
@nicohrubec
nicohrubec requested review from a team as code owners August 4, 2026 07:46
@nicohrubec
nicohrubec requested review from JPeer264, andreiborza and mydea and removed request for a team and mydea August 4, 2026 07:46
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from 21ca822 to e6c988a Compare August 4, 2026 07:55
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from e6c988a to 0159dd8 Compare August 4, 2026 09:29
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from 0159dd8 to 30e225c Compare August 4, 2026 09:48
@nicohrubec
nicohrubec requested a review from chargome August 4, 2026 10:30
@nicohrubec
nicohrubec force-pushed the ref/move-ai-vercel-ai-2 branch from 30e225c to 76ba40c Compare August 4, 2026 12:06
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 76ba40c to 53aee53 Compare August 4, 2026 12:11
@nicohrubec
nicohrubec merged commit ec65dd5 into develop Aug 4, 2026
516 of 519 checks passed
@nicohrubec
nicohrubec deleted the ref/move-ai-vercel-ai-2 branch August 4, 2026 12:53
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.

2 participants