Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/server-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ export type {
TracingChannelPayloadWithSpan,
} from './tracing-channel';
export type { InstrumentationConfig } from './orchestrion';
export { vercelAiIntegration, type VercelAiOptions } from './vercel-ai';
export {
vercelAiIntegration,
type GenAiOptions,
// oxlint-disable-next-line typescript/no-deprecated
type VercelAiOptions,
} from './vercel-ai';
export {
fastifyIntegration,
// oxlint-disable-next-line typescript/no-deprecated
Expand Down
17 changes: 16 additions & 1 deletion packages/server-utils/src/vercel-ai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { defineIntegration, waitForTracingChannelBinding, type IntegrationFn } f
import { subscribeVercelAiTracingChannel } from './vercel-ai-dc-subscriber';
import * as dc from 'node:diagnostics_channel';

export interface VercelAiOptions {
/**
* Recording options shared by all AI integrations.
*
* In v11 every AI integration accepts this single type; prefer it over the
* per-integration option types.
*/
export interface GenAiOptions {
/**
* Enable or disable input recording. Enabled if `dataCollection.genAI.inputs` (or the deprecated `sendDefaultPii` option) is `true`
* or if you set `isEnabled` to `true` in your ai SDK method telemetry settings.
Expand All @@ -16,14 +22,23 @@ export interface VercelAiOptions {
* Integration-level options take precedence over global `dataCollection` config.
*/
recordOutputs?: boolean;
}

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

/**
* Enable or disable truncation of recorded input messages.
* Defaults to `true`.
*
* @deprecated gen_ai input truncation is removed in v11; this option no longer has an effect there.
*/
enableTruncation?: boolean;
}

// oxlint-disable-next-line typescript/no-deprecated
const _vercelAiIntegration = ((options: VercelAiOptions = {}) => {
return {
name: 'VercelAI' as const,
Expand Down
Loading