Packages

wrangler

4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed

Your version

4.88.0

5 May 2026Where it was published

4.167.0 is the newest release of 4.x.

In short

5 new5 fixed2 internal

Release note

Minor Changes

  • Add builtin storage option to wrangler ai-search create.

    wrangler ai-search create now supports a third storage type, builtin, in addition to r2 and web-crawler. When --type builtin is selected (or chosen interactively), Wrangler creates the instance using Cloudflare-managed storage by omitting type and source from the API request — the API treats an absent type as builtin storage. Builtin instances do not accept --source, --prefix, --include-items, or --exclude-items.

  • Add optional custom_metadata step to wrangler ai-search create

    The wrangler ai-search create interactive wizard now lets you declare custom metadata fields that the new AI Search instance should index. Each field is a field_name paired with a data_type (text, number, boolean, or datetime).

    You can provide fields up-front via the new repeatable --custom-metadata flag using field_name:data_type syntax:

    wrangler ai-search create my-instance \
      --type r2 --source my-bucket \
      --custom-metadata title:text \
      --custom-metadata views:number

    For larger schemas, use --custom-metadata-schema to point at a JSON file containing an array of { field_name, data_type } objects:

    wrangler ai-search create my-instance \
      --type r2 --source my-bucket \
      --custom-metadata-schema schema.json
    [
      { "field_name": "title", "data_type": "text" },
      { "field_name": "views", "data_type": "number" }
    ]
  • Prompt for missing name and compatibility date interactively during wrangler deploy

    When deploying without a project name or compatibility_date in your configuration or CLI arguments, wrangler deploy now interactively prompts for the missing values instead of immediately failing with an error. For compatibility date, the prompt offers to use today's date; if you decline, the existing error is shown. The compatibility date prompt is skipped when --latest is passed. In non-interactive or CI environments, behavior is unchanged.

    Additionally, when no config file exists, wrangler deploy now offers to save the prompted name and compatibility date to a wrangler.jsonc file for future use. This interactive flow is available for all wrangler deploy invocations — not just asset-only deployments.

  • Stabilize the secrets configuration property

    The secrets property in the Wrangler config file is no longer experimental and will no longer emit an experimental warning when used. Required secrets are validated during local development and deploy, and used as the source of truth for type generation.

    {
      "secrets": {
        "required": ["API_KEY", "DB_PASSWORD"]
      }
    }

Patch Changes

  • --alias CLI flag now works in wrangler deploy

    The --alias flag was accepted but silently ignored during wrangler deploy — only config.alias took effect. We now collect aliases from both config and CLI flags.

  • Fix wrangler types to generate Fetcher for unsafe.bindings entries with type: "service"

    Previously, all entries in unsafe.bindings (other than ratelimit) generated a fallback any type. wrangler types now generates Fetcher for unsafe bindings declared with type: "service", matching the type used for regular service bindings.

  • Support Flagship bindings in Worker Previews

    wrangler preview now accepts flagship entries in the previews block and includes them in Preview deployment bindings. This lets Workers that use Flagship bindings deploy Preview versions with preview-specific Flagship app IDs.

  • Fix props and fetcher-type service bindings being dropped in unstable_getMiniflareWorkerOptions

    The post-processing in unstable_getMiniflareWorkerOptions was rebuilding serviceBindings from scratch, which silently dropped props on service bindings and dropped fetcher-type bindings entirely. It was also re-deriving durableObjects identically to what buildMiniflareBindingOptions already produces. Both have been removed; buildMiniflareBindingOptions now produces the final bindings unchanged.

  • Skip confirmation prompts in wrangler versions deploy when versions are provided as CLI arguments

    Passing version IDs or version specs to wrangler versions deploy now applies those values directly instead of opening interactive prompts to confirm the same versions and percentages. This makes the command easier to automate without requiring --yes.

  • Preserve request ports in Origin and Referer headers when using wrangler dev --host

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.