feat(server-utils): Instrument Vercel AI experimental_evaluate - #24694
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
size-limit report 📦
|
andreiborza
marked this pull request as ready for review
September 24, 2026 13:42
andreiborza
requested review from
JPeer264,
RulaKhaled,
isaacs,
mydea and
nicohrubec
and removed request for
a team
September 24, 2026 13:42
Member
Author
|
buglitzer moch |
nicohrubec
approved these changes
Sep 24, 2026
| expect(evaluateSpan.name).toBe('evaluate typesafe-ai/jev'); | ||
| expect(evaluateSpan.status).toBe('ok'); | ||
| expect(evaluateSpan.attributes['sentry.origin']?.value).toBe('auto.vercelai.channel'); | ||
| expect(evaluateSpan.attributes['gen_ai.operation.name']?.value).toBe('evaluate'); |
Member
There was a problem hiding this comment.
l: should this also be imported from conventions?
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 91d6874. Configure here.
JPeer264
approved these changes
Sep 25, 2026
Member
Author
|
While I was working on the typesafe sdk integration, I noticed that confidence is missing from vercel ai's instrumentation. Vercel puts the confidence data in provider metadata so we extract it back in as a normalization step to be more in line with the other instrumentation. |
nicohrubec
approved these changes
Sep 25, 2026
| const ORIGIN = 'auto.vercelai.channel'; | ||
|
|
||
| // Not yet in `@sentry/conventions`. | ||
| const GEN_AI_EVALUATE = 'gen_ai.evaluate'; |
Member
Author
There was a problem hiding this comment.
Not yet, I want to wait a bit on the RFC before finalizing-finalzing that.
andreiborza
added a commit
that referenced
this pull request
Sep 25, 2026
… privacy test (#24742) ## What The Vercel AI evaluate privacy test now uses its own instrument file to turn off recording, instead of an environment variable. ## Why This follows how the other suites set up different SDK options. Follow-up to #24694. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Vercel AI
experimental_evaluatecalls now create agen_ai.evaluatespan with the state and questions as input messages and the answers as output messages.Why
AI SDK 7 added evaluation (for example TypeSafe's Jev through AI Gateway), and we did not capture these calls.
Closes: #24692