Skip to content

ref(core)!: Rename Vercel AI cache/reasoning token attributes - #22823

Open
nicohrubec wants to merge 1 commit into
ref/genai-tool-output-to-tool-call-resultfrom
ref/genai-vercel-token-attributes
Open

ref(core)!: Rename Vercel AI cache/reasoning token attributes#22823
nicohrubec wants to merge 1 commit into
ref/genai-tool-output-to-tool-call-resultfrom
ref/genai-vercel-token-attributes

Conversation

@nicohrubec

Copy link
Copy Markdown
Member

Switches the Vercel AI integration from the deprecated gen_ai.usage.input_tokens.cached, gen_ai.usage.input_tokens.cache_write, and gen_ai.usage.output_tokens.reasoning attributes to their @sentry/conventions replacements gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_creation.input_tokens, and gen_ai.usage.reasoning.output_tokens.

Part of #22482

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.82 kB - -
@sentry/browser - with treeshaking flags 28.02 kB - -
@sentry/browser (incl. Tracing) 47.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.81 kB - -
@sentry/browser (incl. Tracing, Replay) 86.4 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.84 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.12 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.77 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.66 kB - -
@sentry/browser (incl. FeedbackAsync) 39.76 kB - -
@sentry/browser (incl. Metrics) 30.89 kB - -
@sentry/browser (incl. Logs) 31.12 kB - -
@sentry/browser (incl. Metrics & Logs) 31.8 kB - -
@sentry/react 31.6 kB - -
@sentry/react (incl. Tracing) 49.33 kB - -
@sentry/vue 34.74 kB - -
@sentry/vue (incl. Tracing) 49.05 kB - -
@sentry/svelte 29.85 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 47.45 kB - -
CDN Bundle (incl. Logs, Metrics) 33.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.83 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.78 kB - -
CDN Bundle (incl. Tracing, Replay) 85.09 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.17 kB - -
CDN Bundle - uncompressed 95.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.23 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.51 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.51 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.48 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.17 kB - -
@sentry/nextjs (client) 51.92 kB - -
@sentry/sveltekit (client) 47.51 kB - -
@sentry/core/server 79.59 kB -0.03% -19 B 🔽
@sentry/core/browser 51.6 kB - -
@sentry/node 121.69 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 85.24 kB - -
@sentry/aws-serverless 93.46 kB +0.01% +2 B 🔺
@sentry/cloudflare (withSentry) - minified 197.55 kB - -
@sentry/cloudflare (withSentry) 485.69 kB - -

View base workflow run

@nicohrubec
nicohrubec marked this pull request as ready for review July 29, 2026 12:55
@nicohrubec
nicohrubec requested a review from a team as a code owner July 29, 2026 12:55
@nicohrubec
nicohrubec requested review from andreiborza, isaacs and mydea and removed request for a team July 29, 2026 12:55

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can product handle this correctly already?

Emit the `gen_ai.usage.cache_read.input_tokens`,
`gen_ai.usage.cache_creation.input_tokens`, and
`gen_ai.usage.reasoning.output_tokens` attributes from `@sentry/conventions`
instead of the deprecated `gen_ai.usage.input_tokens.cached`,
`gen_ai.usage.input_tokens.cache_write`, and
`gen_ai.usage.output_tokens.reasoning` aliases in the Vercel AI integration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec requested a review from a team as a code owner July 29, 2026 14:02
@nicohrubec
nicohrubec force-pushed the ref/genai-vercel-token-attributes branch from 0d52006 to 8cd6677 Compare July 29, 2026 14:02
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.

2 participants