feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions - #23105
Draft
nicohrubec wants to merge 1 commit into
Draft
feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions#23105nicohrubec wants to merge 1 commit into
GenAiOptions and deprecate VercelAiOptions#23105nicohrubec wants to merge 1 commit into
Conversation
…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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3100049. Configure here.
| * @deprecated Use {@link GenAiOptions} instead. This type will be removed in v11. | ||
| * Note that `enableTruncation` is also removed in v11 (gen_ai input truncation no longer exists). | ||
| */ | ||
| export interface VercelAiOptions extends GenAiOptions { |
There was a problem hiding this comment.
Deprecated type breaks sibling packages
Medium Severity
Marking VercelAiOptions as @deprecated leaves live imports in @sentry/node, @sentry/cloudflare, and @sentry/deno without a migration or typescript/no-deprecated suppression. That rule is set to error repo-wide, so type-aware lint in those packages fails even though this package suppresses its own usages.
Reviewed by Cursor Bugbot for commit 3100049. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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.