-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Add opt-in vercelAiIntegration
to cloudflare & vercel-edge
#16732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+359
−203
Conversation
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
a6417a2
to
b7df3e9
Compare
andreiborza
reviewed
Jun 25, 2025
a7827af
to
6b09503
Compare
size-limit report 📦
|
andreiborza
reviewed
Jun 25, 2025
Co-authored-by: Andrei <168741329+andreiborza@users.noreply.github.com>
7865cc5
to
6c68d0e
Compare
vercelAiIntegration
& modulesIntegration
vercelAiIntegration
vercelAiIntegration
vercelAiIntegration
to cloudflare & vercel-edge
andreiborza
approved these changes
Jun 26, 2025
* This is a copy of the Vercel AI integration from the node SDK. | ||
* | ||
* The only difference is that it does not use `@opentelemetry/instrumentation` | ||
* because Cloudflare Workers do not support it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
* because Cloudflare Workers do not support it. | |
* because vercel-edge does not support it. |
45f2304
to
d898309
Compare
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.
This is on top of #16714.
This adds the
vercelAiIntegration
to the cloudflare SDK, as well as to the vercel-edge SDK.I moved the critical code from node to core package, so we can reuse this (the code to process spans).
The integration is not added by default, but needs to be added manually. then it will "force" add the event processors etc. We cannot auto-detect the
ai
package, sadly, because this does not work in workers 😢 so for now it needs to be added manually to avoid overhead for users that don't need this.@andreiborza let's verify that this works when deployed to cloudflare, esp. also the auto-enablement via the modules integration etc 🤔