Add Cloudflare AiSearch component#6777
Conversation
vimtor
left a comment
There was a problem hiding this comment.
thanks for your contribution @msdbcardoso
i left some comments but this looks very promising
besides solving them, would you mind adding a cloudflare-ai-search working example to the examples directory?
Thanks, of course! I did notice just now fixing the conflicts messed up thing -/-, thanks for calling those out! |
- Fix missing closing braces in AiSearchNamespaceBinding interface - Fix missing });/break in aiSearchNamespaceBindings wrangler case - Fix missing closing } in aiSearchNamespaces config block - Fix duplicate semicolon in Binding union type - Register aiSearchBindings/aiSearchNamespaceBindings in typescript.go - Add cloudflare-ai-search example
Cover create, list, upload, search, and delete operations using the namespace binding.
Rewrite cloudflare-ai-search to use instance binding (the common case) with routes for search, filtered search, chat completions, and streaming. Add cloudflare-ai-search-namespace for the advanced namespace binding with multi-instance management and cross-instance search. Both examples now follow repo conventions: minimal package.json, JSDoc for docs generation, workers-types in devDependencies, and all API calls verified against @cloudflare/workers-types.
|
the deployed example fails because the pulumi provider doesn't support that binding in the latest version we'll need to wait for the provider to be updated |
|
We'll handle the upstream dependency and move to ready when it's done |
Adds a new
sst.cloudflare.AiSearchcomponent for the AI Search Workers binding.Supports both binding types:
ai_search) — binds to a single instance by nameai_search_namespaces) — binds to a namespace for multi-instance accessNote: The instance binding (
instanceNameproperty) requires@pulumi/cloudflareto bridge a Terraform provider version that includes theinstance_namefield onWorkerScriptBinding. The field is already in the Terraform provider and the Cloudflare OpenAPI spec, but hasn't been bridged to Pulumi yet. The namespace binding andsst devmode work today.