Skip to content

Add ai_binding_experimental compat flag for AutoRAG/Gateway/ToMarkdown RPC#6318

Open
G4brym wants to merge 1 commit intocloudflare:mainfrom
G4brym:autorag-rpc-beta
Open

Add ai_binding_experimental compat flag for AutoRAG/Gateway/ToMarkdown RPC#6318
G4brym wants to merge 1 commit intocloudflare:mainfrom
G4brym:autorag-rpc-beta

Conversation

@G4brym
Copy link
Member

@G4brym G4brym commented Mar 13, 2026

Adds an experimental compatibility flag ai_binding_experimental that gates whether the AI binding's autorag(), gateway(), and toMarkdown() 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.

@G4brym G4brym requested review from a team as code owners March 13, 2026 13:13
@G4brym G4brym marked this pull request as draft March 13, 2026 13:23
@G4brym G4brym force-pushed the autorag-rpc-beta branch 4 times, most recently from 33d3465 to 3515af8 Compare March 13, 2026 14:49
@G4brym G4brym marked this pull request as ready for review March 13, 2026 15:20
@G4brym G4brym force-pushed the autorag-rpc-beta branch from 3515af8 to b1ae15c Compare March 19, 2026 09:43
@G4brym G4brym force-pushed the autorag-rpc-beta branch 2 times, most recently from c487793 to ce5e42b Compare March 19, 2026 16:37
@G4brym G4brym changed the title Add RPC path for AutoRAG via beta flag Add ai_binding_experimental compat flag for AutoRAG/Gateway/ToMarkdown RPC Mar 19, 2026
@G4brym G4brym force-pushed the autorag-rpc-beta branch 2 times, most recently from ca70c3b to 2d13f7c Compare March 19, 2026 17:20
@G4brym G4brym force-pushed the autorag-rpc-beta branch 2 times, most recently from 694ea65 to 8f36286 Compare March 19, 2026 19:41
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)
@G4brym G4brym force-pushed the autorag-rpc-beta branch from 8f36286 to cfca3d4 Compare March 19, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants