Skip to content

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

Draft
nicohrubec wants to merge 1 commit into
v10from
ref/v10-deprecate-vercelai-options
Draft

feat(v10/server-utils): Add GenAiOptions and deprecate VercelAiOptions#23105
nicohrubec wants to merge 1 commit 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.

…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>

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3100049. Configure here.

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