Skip to content

feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions - #23105

Closed
nicohrubec wants to merge 2 commits into
v10from
ref/v10-deprecate-vercelai-options
Closed

feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions#23105
nicohrubec wants to merge 2 commits into
v10from
ref/v10-deprecate-vercelai-options

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

Forward-compat for the v11 change that consolidates all AI integration option types into a single shared GenAiOptions (see #23103).

VercelAiOptions has been a public export of @sentry/server-utils since v10.68. v11 removes it in favour of GenAiOptions. To give v10 users a warning and a migration path ahead of that:

  • Adds GenAiOptions ({ recordInputs?, recordOutputs? }) to @sentry/server-utils.
  • Marks VercelAiOptions @deprecated, pointing to GenAiOptions. It still extends GenAiOptions and keeps enableTruncation (which still works on v10), so this is fully backward compatible — no runtime or type-shape change, just a deprecation notice.
// v10 (still works, now deprecated)
import type { VercelAiOptions } from "@sentry/server-utils";
// preferred going into v11
import type { GenAiOptions } from "@sentry/server-utils";

Draft to let CI confirm.

Comment thread packages/server-utils/src/vercel-ai/index.ts
…ions`

Forward-compat for the v11 consolidation of AI integration option types into a
single shared `GenAiOptions`. Adds `GenAiOptions` (`{ recordInputs?, recordOutputs? }`)
to `@sentry/server-utils` now, and marks the existing public `VercelAiOptions`
(shipped since v10.68) `@deprecated` in favour of it. `VercelAiOptions` still
extends `GenAiOptions` and keeps `enableTruncation`, so nothing breaks on v10 —
users just get an IDE deprecation warning and a migration path before v11.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec force-pushed the ref/v10-deprecate-vercelai-options branch from 3100049 to c1ecee8 Compare August 10, 2026 12:34

@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.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

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

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c1ecee8. Configure here.

* Integration-level options take precedence over global `dataCollection` config.
*/
recordOutputs?: boolean;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Feat PR missing required tests

Low Severity

This feat PR adds the public GenAiOptions export without an integration or E2E test. Per the PR review guidelines in the rules file, feat PRs need at least one of those. Even for a type-forward-compat change, a small export or typing regression check would cover the new migration surface. Flagged because it was mentioned in this rules file.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit c1ecee8. Configure here.

Deprecating `VercelAiOptions` made the node/deno/cloudflare integrations that
consume it internally trip the `no-deprecated` lint rule. Add the standard
`oxlint-disable-next-line` at each internal use site (mirroring how the repo
already handles internal references to its own deprecated exports).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.75 kB added added
@sentry/browser - with treeshaking flags 26.19 kB added added
@sentry/browser (incl. Tracing) 46.59 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.37 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.34 kB added added
@sentry/browser (incl. Tracing, Replay) 85.83 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.47 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.55 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.19 kB added added
@sentry/browser (incl. Feedback) 44.92 kB added added
@sentry/browser (incl. sendFeedback) 32.54 kB added added
@sentry/browser (incl. FeedbackAsync) 37.67 kB added added
@sentry/browser (incl. Metrics) 28.83 kB added added
@sentry/browser (incl. Logs) 29.06 kB added added
@sentry/browser (incl. Metrics & Logs) 29.75 kB added added
@sentry/react 29.55 kB added added
@sentry/react (incl. Tracing) 48.85 kB added added
@sentry/vue 33.17 kB added added
@sentry/vue (incl. Tracing) 48.55 kB added added
@sentry/svelte 27.77 kB added added
CDN Bundle 30.14 kB added added
CDN Bundle (incl. Tracing) 48.55 kB added added
CDN Bundle (incl. Logs, Metrics) 31.72 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 70.98 kB added added
CDN Bundle (incl. Tracing, Replay) 86.05 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.36 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.12 kB added added
CDN Bundle - uncompressed 89.86 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.74 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.58 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.72 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.34 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.98 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.94 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.68 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.64 kB added added
@sentry/nextjs (client) 51.39 kB added added
@sentry/sveltekit (client) 47.01 kB added added
@sentry/core/server 80.55 kB added added
@sentry/core/browser 66.77 kB added added
@sentry/node-core 63.24 kB added added
@sentry/node 125.88 kB added added
@sentry/node (incl. diagnostics channel injection) 151.32 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.4 kB added added
@sentry/node - without tracing 74.93 kB added added
@sentry/aws-serverless 84.2 kB added added
@sentry/cloudflare (withSentry) - minified 202 kB added added
@sentry/cloudflare (withSentry) 496.46 kB added added

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