Add ai_binding_experimental compat flag for AutoRAG/Gateway/ToMarkdown RPC#6318
Open
G4brym wants to merge 1 commit intocloudflare:mainfrom
Open
Add ai_binding_experimental compat flag for AutoRAG/Gateway/ToMarkdown RPC#6318G4brym wants to merge 1 commit intocloudflare:mainfrom
G4brym wants to merge 1 commit intocloudflare:mainfrom
Conversation
33d3465 to
3515af8
Compare
3515af8 to
b1ae15c
Compare
jasnell
approved these changes
Mar 19, 2026
c487793 to
ce5e42b
Compare
ca70c3b to
2d13f7c
Compare
danlapid
reviewed
Mar 19, 2026
694ea65 to
8f36286
Compare
Gate autorag(), gateway(), and toMarkdown() RPC routing on the existing 'experimental' compat flag instead of a dedicated flag, per code review feedback. - Read Cloudflare.compatibilityFlags['experimental'] in ai-api.ts - autorag() and toMarkdown() use RPC when experimental flag is enabled - gateway() uses RPC when experimental flag is enabled or options.beta === true - Add autorag RPC test config and mock (WorkerEntrypoint/RpcTarget)
8f36286 to
cfca3d4
Compare
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.
Adds an experimental compatibility flag
ai_binding_experimentalthat gates whether the AI binding'sautorag(),gateway(), andtoMarkdown()methods route through JS RPC instead of HTTP fetch.When enabled, these methods delegate directly to the upstream service's RPC methods, rather than constructing local service objects that make HTTP fetch calls.