Skip to content

Add RPC path for AutoRAG via beta flag#6318

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

Add RPC path for AutoRAG via beta flag#6318
G4brym wants to merge 1 commit intocloudflare:mainfrom
G4brym:autorag-rpc-beta

Conversation

@G4brym
Copy link
Member

@G4brym G4brym commented Mar 13, 2026

Add a beta flag option to Ai.autorag() that routes through JS RPC (this.#fetcher.autorag()) instead of local HTTP fetch, mirroring the gateway() pattern. Default behavior unchanged.

  • Add autorag to Fetcher interface in ai-api.ts
  • Update autorag() to accept { beta: true } option for RPC path
  • Refactor autorag mock to use WorkerEntrypoint/RpcTarget for RPC support
  • Add RPC beta test cases alongside existing fetch-based tests
  • Update .wd-test config with entrypoint and compat flags for RPC
  • this is an undocumented change, since we want to move everyone over to rpc soon

@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 3 times, most recently from 6eaa0c9 to 33d3465 Compare March 13, 2026 14:39
Add a beta flag option to Ai.autorag() that routes through JS RPC (this.#fetcher.autorag()) instead of local HTTP fetch, mirroring the gateway() pattern. Default behavior unchanged.

- Add autorag to Fetcher interface in ai-api.ts

- Update autorag() to accept { beta: true } option for RPC path

- Refactor autorag mock to use WorkerEntrypoint/RpcTarget for RPC support

- Add RPC beta test cases alongside existing fetch-based tests

- Update .wd-test config with entrypoint and compat flags for RPC

- Update autorag type definition in ai.d.ts
@G4brym G4brym force-pushed the autorag-rpc-beta branch 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
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.

1 participant