sincecutoff.com
← all changes

wrangler preview supports AI Search bindings

Introduced 2026-09-15 · score 0.92

HOW TO USE IT

When a Worker needs AI Search bindings in a Preview deployment, declare `ai_search` and/or `ai_search_namespaces` explicitly under `previews`, then run `npx wrangler preview`.

{ "previews": { "ai_search": [{ "binding": "<BINDING_NAME>", "instance_name": "<INSTANCE_NAME>" }], "ai_search_namespaces": [{ "binding": "<BINDING_NAME>", "namespace": "<NAMESPACE_NAME>" }] } }
npx wrangler preview

WHY THIS HELPS

Add AI Search bindings needed by a Worker to its Preview deployment configuration.

REQUIREMENTS AND LIMITATIONS

  • Version: 4.132.0
  • ai_search[].binding (required): Binding name used to refer to the AI Search instance.
  • ai_search[].instance_name (required): AI Search instance name; must exist in the default namespace at deploy time.
  • ai_search_namespaces[].binding (required): Binding name used to refer to the AI Search namespace.
  • ai_search_namespaces[].namespace (required): AI Search namespace name; a missing namespace is created on deploy according to the current configuration docs.
  • previews (required): Preview-specific configuration block; Preview settings do not inherit production settings.
  • Prerequisite: Worker Previews requires Wrangler 4.135.0 or later in the current Get started guide.
  • These bindings are non-inheritable and must be declared explicitly under `previews`.
  • Bindings attach to existing AI Search resources; Preview does not provision new isolated instances or namespaces.
  • Docs conflict: The current Wrangler configuration docs say a missing AI Search namespace is created on deploy, while the v4.132.0 release note says Preview bindings attach to existing resources and Preview does not provision isolated namespaces. Apply the release note's existing-resource limitation to Preview behavior.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card