wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
4.167.0 is the newest release of 4.x.
In short
5 new5 fixed2 internal
Release note
Minor Changes
Add
builtinstorage option towrangler ai-search create.wrangler ai-search createnow supports a third storage type,builtin, in addition tor2andweb-crawler. When--type builtinis selected (or chosen interactively), Wrangler creates the instance using Cloudflare-managed storage by omittingtypeandsourcefrom the API request — the API treats an absenttypeas builtin storage. Builtin instances do not accept--source,--prefix,--include-items, or--exclude-items.Add optional
custom_metadatastep towrangler ai-search createThe
wrangler ai-search createinteractive wizard now lets you declare custom metadata fields that the new AI Search instance should index. Each field is afield_namepaired with adata_type(text,number,boolean, ordatetime).You can provide fields up-front via the new repeatable
--custom-metadataflag usingfield_name:data_typesyntax: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-schemato 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 deployWhen deploying without a project name or
compatibility_datein your configuration or CLI arguments,wrangler deploynow 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--latestis passed. In non-interactive or CI environments, behavior is unchanged.Additionally, when no config file exists,
wrangler deploynow offers to save the prompted name and compatibility date to awrangler.jsoncfile for future use. This interactive flow is available for allwrangler deployinvocations — not just asset-only deployments.Stabilize the
secretsconfiguration propertyThe
secretsproperty 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
--aliasCLI flag now works inwrangler deployThe
--aliasflag was accepted but silently ignored duringwrangler deploy— onlyconfig.aliastook effect. We now collect aliases from both config and CLI flags.Fix
wrangler typesto generateFetcherforunsafe.bindingsentries withtype: "service"Previously, all entries in
unsafe.bindings(other thanratelimit) generated a fallbackanytype.wrangler typesnow generatesFetcherfor unsafe bindings declared withtype: "service", matching the type used for regular service bindings.Support Flagship bindings in Worker Previews
wrangler previewnow acceptsflagshipentries in thepreviewsblock and includes them in Preview deployment bindings. This lets Workers that use Flagship bindings deploy Preview versions with preview-specific Flagship app IDs.Fix
propsand fetcher-type service bindings being dropped inunstable_getMiniflareWorkerOptionsThe post-processing in
unstable_getMiniflareWorkerOptionswas rebuildingserviceBindingsfrom scratch, which silently droppedpropson service bindings and droppedfetcher-type bindings entirely. It was also re-derivingdurableObjectsidentically to whatbuildMiniflareBindingOptionsalready produces. Both have been removed;buildMiniflareBindingOptionsnow produces the final bindings unchanged.Skip confirmation prompts in
wrangler versions deploywhen versions are provided as CLI argumentsPassing version IDs or version specs to
wrangler versions deploynow 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
OriginandRefererheaders when usingwrangler 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.