Skip to content

fix(server-utils): update Vercel AI decide span naming - #25275

Closed
kashish00208 wants to merge 1 commit into
getsentry:developfrom
kashish00208:fix/vercel-ai-decide-span-naming
Closed

kashish00208 wants to merge 1 commit into
getsentry:developfrom
kashish00208:fix/vercel-ai-decide-span-naming

Conversation

@kashish00208

Copy link
Copy Markdown

Summary
Fixes #25251
Update Vercel AI tracing to use experimental_decide and the gen_ai.decide operation.
Align span names and gen_ai.operation.name with the updated GenAI conventions.
Update unit, Node integration, and E2E test scenarios.
Preserve evaluation input/output message attributes and backward compatibility with older supported AI SDK versions.
Test plan
Unit tests
Node integration tests (vercelai/v6_v7)
E2E tests (node-eve)

@kashish00208
kashish00208 requested a review from a team as a code owner October 12, 2026 12:14
@kashish00208
kashish00208 requested review from isaacs and mydea and removed request for a team October 12, 2026 12:14
@github-actions github-actions Bot added the external PR from an external contributor label Oct 12, 2026
@andreiborza

Copy link
Copy Markdown
Member

Hi @kashish00208, this is a duplicate of #25274. Will close this, but thank you for the contribution.

@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 3 potential issues.

Fix All in Cursor

❌ 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 fc960e9. Configure here.

| 'embed'
| 'embedMany'
| 'rerank'
| 'experimental_evaluate'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Old evaluate channel events ignored

High Severity

experimental_evaluate was dropped from the channel type, the start switch, and getOutputMessages. Older supported ai 7.x versions still publish that event name, so those decide/evaluate calls no longer create spans or record evaluation output messages.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fc960e9. Configure here.

});

// `ai` 7.0.128 renamed the channel event from `experimental_evaluate` to `experimental_decide`.
it.each(['experimental_evaluate', 'experimental_decide'] as const)('creates an evaluate span for `%s`', type => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unit test leaves type unbound

Medium Severity

The it.each callback that supplied type was replaced with a plain it, but the message still uses the type shorthand. The test no longer sends experimental_decide and does not compile or run, so it does not cover the rename.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit fc960e9. Configure here.

expect(span.data).toEqual({
[SENTRY_ORIGIN]: 'auto.ai.cloudflare.workers_ai',
[SENTRY_OP]: 'gen_ai.evaluate',
[SENTRY_OP]: 'gen_ai.decide',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unrelated tests expect decide op

Medium Severity

Workers AI, TypeSafe, and Cloudflare tests now assert sentry.op is gen_ai.decide, but those integrations still emit GEN_AI_EVALUATE (gen_ai.evaluate). This PR only changes the Vercel AI subscriber, so those suites fail without a matching production or conventions change.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit fc960e9. Configure here.

@kashish00208

Copy link
Copy Markdown
Author

@andreiborza Thanks for letting me know! I hadn't noticed the existing PR , I'll make sure to check existing issues before contributing next time.

@kashish00208
kashish00208 deleted the fix/vercel-ai-decide-span-naming branch October 12, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename Vercel AI experimental_decide spans from evaluate to decide

2 participants