feat(cloudflare): Enable AI v7 support for Cloudflare in the /nodejs_compat entrypoint#21917
Open
JPeer264 wants to merge 2 commits into
Open
feat(cloudflare): Enable AI v7 support for Cloudflare in the /nodejs_compat entrypoint#21917JPeer264 wants to merge 2 commits into
JPeer264 wants to merge 2 commits into
Conversation
d6415d8 to
32490ef
Compare
andreiborza
reviewed
Jul 2, 2026
| warnings: [], | ||
| }), | ||
| }), | ||
| prompt: 'How much is the fish?', |
andreiborza
approved these changes
Jul 2, 2026
| @@ -0,0 +1,57 @@ | |||
| /** | |||
| * This is a copy of the Vercel AI integration from the Cloudflare SDK. | |||
Member
There was a problem hiding this comment.
This reads a bit confusing, we are in the cloudflare sdk.
Member
Author
There was a problem hiding this comment.
Ya, I rephrased that 10 times - was never happy. Maybe I specify the entrypoint
Member
There was a problem hiding this comment.
Yeah, I'd specify the tracing path, doesn't have to be the exact path of the integration.
Contributor
size-limit report 📦
|
c3abba8 to
670db55
Compare
dd006e2 to
3043f8f
Compare
670db55 to
cd8726f
Compare
3043f8f to
73e8b22
Compare
andreiborza
approved these changes
Jul 6, 2026
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.

re-implementing #21793 with tests, but in the
/nodejs_compatentrypoint. The docs will be updated to clarify that AI v7 would only work in this entrypoint. I didn't want to name the integration differently, as then, the "drop-in replacement" would not work properly.The majority of the PR is tests, and the actual code implementation is just a copy from the base entrypoint including #21793.
Test info
Unfortunately AI v7 cannot be installed as cloudflare-integration-test dependency, as it requires Node v22. It forced me to add 2 e2e-tests instead.
The test matrix is as follows:
nodejs_als(cloudflare-integration-test)nodejs_compat(cloudflare-integration-test)nodejs_als(e2e-test, confirming that it doesn't work)nodejs_compat(e2e-test)If v7 support would be added by accident to the base entrypoint, then the Vercel AI v6 with
nodejs_alswill fail. That should have prevented #21793 to exist actually.