feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions - #23105
feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions#23105nicohrubec wants to merge 2 commits into
GenAiOptions and deprecate VercelAiOptions#23105Conversation
…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>
3100049 to
c1ecee8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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; | ||
| } |
There was a problem hiding this comment.
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.
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>
size-limit report 📦
|


Forward-compat for the v11 change that consolidates all AI integration option types into a single shared
GenAiOptions(see #23103).VercelAiOptionshas been a public export of@sentry/server-utilssince v10.68. v11 removes it in favour ofGenAiOptions. To give v10 users a warning and a migration path ahead of that:GenAiOptions({ recordInputs?, recordOutputs? }) to@sentry/server-utils.VercelAiOptions@deprecated, pointing toGenAiOptions. It stillextends GenAiOptionsand keepsenableTruncation(which still works on v10), so this is fully backward compatible — no runtime or type-shape change, just a deprecation notice.Draft to let CI confirm.