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
1 removed6 new9 fixed2 internal
- Removed
Remove the gated Web Search binding and Wrangler command
Release note
Minor Changes
Categorise the positional path argument to
wrangler deployandwrangler versions uploadin command telemetryCommand telemetry now records a coarse category for the entry-point/assets positional (
wrangler deploy <path>) undersanitizedArgs.path, so we can understand whether people pass a file, a directory, or a relational reference such as.or../example. The possible values arefile,directory,current-dir,parent-relative, andnot-found, ornullwhen no positional is provided. The raw path is never sent — only the category.Configure application-wide logs for experimental Durable Object-managed Containers
Set
containers.observability.enabledorcontainers.observability.logs.enabledwhen usingscheduling_policy: "durable_object". Normal deployments create missing applications and update explicitly configured log settings without a Container rollout. Omitted settings preserve the application configuration; root Worker observability is not inherited for this policy.Version uploads may initialize missing applications but preserve existing settings. Deploying or rolling back Worker versions also preserves existing application settings, and
--containers-rollout=noneskips their updates.Support per-image build options for experimental Durable Object-managed Containers
Set
build_contextandbuild_varsalongsidedockerfilein a Container's namedimagesentries. Context paths resolve relative to the Wrangler configuration file and default to the Dockerfile's directory. Build variables are passed as Docker build arguments. Entries using the same Dockerfile with different contexts or variables are built separately.{ "containers": [ { "class_name": "Sandbox", "scheduling_policy": "durable_object", "images": { "app": { "dockerfile": "./docker/Dockerfile", "build_context": ".", "build_vars": { "APP_ENV": "production" } } } } ] }Support AI Search bindings in Worker Previews
wrangler previewnow acceptsai_searchandai_search_namespacesentries in thepreviewsblock and includes them in Preview deployment bindings. This lets Workers that use AI Search instance or namespace bindings attach existing resources to Preview deployments, including preview-specific instance or namespace names.These bindings are non-inheritable: declare them explicitly under
previews. They attach to existing AI Search resources; preview does not provision new isolated instances or namespaces.private beta: Add
--secrets-fileand--varflags towrangler previewLike
wrangler deployandwrangler versions upload,wrangler previewnow accepts a--secrets-fileflag pointing to a JSON or .env format file, and--var KEY:VALUEpairs that are injected into the Preview deployment as plain text variables. CLI vars override same-named vars from thepreviewssection of your config file, and secrets from the file take precedence over both:wrangler preview --secrets-file .env.preview --var API_URL:https://api.example.com- Removed
Remove the gated Web Search binding and Wrangler command
The unreleased search binding and its experimental command have been removed from Wrangler, Miniflare, and configuration APIs.
Allow experimental Durable Object-managed Containers to link by name through exports
Containers using
scheduling_policy: "durable_object"can now specifynameand link fromexports.<Class>.containerwithout repeatingclass_name. Deploy and version upload resolve that link for image preparation, Worker metadata, and Container application creation.
Patch Changes
Sync Local Explorer endpoint lists across agent hints
The Local Explorer endpoint list is now consistent across the three places it appears: the AGENTS.md template in
create-cloudflare, the runtime agent hint inwrangler dev, and the Vite plugin agent hint. All three now include theobservability/clearendpoint, use the canonical/cdn-cgi/local/explorerpath, and have cross-reference comments pointing to each other.Fix per-query overrides for
wrangler ai-search search--score-threshold,--max-num-results,--filter, and--rerankingare now sent using the AI Search request schema, so the service applies them to searches instead of ignoring them.Surface the original error message, name and stack when the dev server reports an internal error
Previously
wrangler devcould exit with an empty✘ [ERROR]log that gave no indication of what went wrong (e.g.Network connection lost., see #14641). These errors now include their original message, name and stack, so the failure is actually diagnosable.Treat 502, 503, and 504 as gateway errors during asset upload retries
Pages and Workers asset uploads now retry more patiently when the Cloudflare API responds with a 502, 503 or 504 gateway error, reducing concurrency and waiting longer between attempts instead of failing the deploy quickly.
Improve over-limit
run_worker_firsterrors when duplicate rules are presentThe error now reports distinct and duplicate-entry counts and lists duplicated rules, making it clear when removing redundant entries can bring the configuration within the limit.
Too many `run_worker_first` rules were provided; 105 rules provided (99 distinct, 6 duplicate entries) exceeds max of 100. Note: duplicate entries count towards the route limit. Ensure that no duplicate rules are present in your `run_worker_first` configuration. The duplicated rules found are: - "/rule/0" - "/rule/1" - "/rule/2" - "/rule/3" - "/rule/4" ...and 1 more duplicated rule.
Replace
execawithtinyexecfor running subprocesses, shrinking the bundled Wrangler output.Preserve service-worker middleware error propagation with spec-compliant event dispatch
Wrangler's synthetic service-worker events now propagate listener exceptions to middleware without changing the behavior of user-created
EventTargetinstances.Reduce the size of Wrangler's published package
Exclude test-only, build-only, and obsolete template files from the npm package while retaining all runtime templates.
Restore static asset upload concurrency after gateway errors
Static asset uploads previously remained at concurrency one for the rest of the deployment after any 524 response, which could make large deployments exceed the upload session lifetime. Successful uploads now restore the session's original concurrency gradually while retaining gateway throttling. Requests that were already in flight when throttling began do not restore capacity, so a burst of stale successes cannot immediately undo backpressure.
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.