Repository navigation
fix(server-utils): update Vercel AI decide span naming - #25275
kashish00208 wants to merge 1 commit into
Conversation
|
Hi @kashish00208, this is a duplicate of #25274. Will close this, but thank you for the contribution. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ 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' |
There was a problem hiding this comment.
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)
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 => { |
There was a problem hiding this comment.
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.
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', |
There was a problem hiding this comment.
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)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit fc960e9. Configure here.
|
@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. |


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)