This section documents version-specific API changes from recent v4.x releases. Focus on recent major/minor releases that introduce new commands, bindings, configuration properties, and breaking changes.
-
NEW: wrangler ai-search command namespace — v4.79.0 adds CLI commands for managing Cloudflare AI Search (open beta): ai-search list, create, get, update, delete, search, stats source
-
NEW: wrangler tunnel commands — v4.75.0 adds a full set of commands for managing remotely-managed Cloudflare Tunnels: tunnel create, list, info, delete, run, quick-start. All marked experimental source
-
NEW: --secrets-file parameter for wrangler deploy and wrangler versions upload — v4.74.0 adds support for uploading secrets in a single operation alongside Worker code, supporting both JSON and .env file formats source
-
NEW: --local flag for all Workflows CLI commands — v4.79.0 adds --local flag targeting local dev server instead of Cloudflare API, used with workflows list, trigger, instances describe, instances pause source
-
NEW: stream binding type — v4.76.0 recognises stream binding in configuration, deployment metadata, and type generation source
-
NEW: ai_search_namespaces and ai_search binding types — v4.78.0 adds two new AI Search binding types: namespace binding (auto-provisioned) and instance binding (pre-existing). Both remote-only in local dev source
-
NEW: vpc_networks binding support — v4.80.0 adds binding for routing Worker traffic through Cloudflare Tunnel or network, configured with tunnel_id or network_id source
-
NEW: X_BROWSER_HEADFUL environment variable for headful browser rendering — v4.80.0 (experimental) enables visible browser mode during local development when set to true source
-
BREAKING: cf-requirements support for Python workers removed — v4.77.0 removes support which "hasn't worked with the runtime for a while now" source
-
NEW: Experimental secrets configuration property — v4.77.0, 4.70.0 add secrets.required array for declaring required secret names with validation during deploy and local dev source
-
NEW: wrangler containers registries credentials command — v4.70.0 generates short-lived push/pull credentials for Cloudflare managed registry with --push, --pull, --expiration-minutes flags source
-
NEW: wrangler containers instances <application_id> command — v4.74.0 lists all container instances for a given application with pagination support source
-
NEW: wrangler containers list pagination and Dash API — v4.76.0 rewrites to use /dash/applications endpoint with paginated table output (ID, Name, State, Live Instances, Last Modified), supports --per-page and --json flags source
-
NEW: wrangler pages deployment delete command — v4.64.0 adds ability to delete Pages deployments via CLI with --force flag to skip confirmation source
-
NEW: Type generation for AI Search bindings — v4.80.0 generates AiSearchNamespace and AiSearchInstance types when running wrangler types source
-
NEW: Type generation for Stream bindings — v4.76.0 generates Stream types in wrangler types output source
-
NEW: Schema-based type generation for Pipeline bindings — v4.67.0 generates typed Pipeline<T> bindings from stream schema when using wrangler types source
-
NEW: escapeCodeTimeout option for onKeyPress utility — v4.74.0 adds optional parameter controlling how long readline waits to disambiguate Esc from multi-byte escape sequences (default 500ms) source
-
NEW: WRANGLER_COMMAND environment variable for custom build commands — v4.64.0 sets to "dev", "deploy", "versions upload", or "types" based on invoked command source
-
Keep compatibility_date current (within 30 days of today) to access latest runtime features and bug fixes without code changes — new projects benefit from automatic runtime updates source
-
Always run wrangler types after changing bindings in your config to regenerate TypeScript definitions — hand-written Env interfaces drift from actual config and cause deploy-time type mismatches source
-
Store secrets with wrangler secret put only; never add them to config files or source code — config is version-controlled and often committed publicly source
-
Define bindings per environment (production, staging, development) — bindings are not inherited from root config, so missing them per-environment causes undefined binding errors at runtime source
-
Use custom domains when your Worker is the origin, and routes when it sits in front of an existing origin — routes require a proxied DNS record first, otherwise requests never reach your Worker source
-
Access Cloudflare services via bindings (R2, KV, D1, Queues) instead of REST API calls — bindings are in-process, require no auth, add no network latency, and avoid quota throttling source
-
Use Queues for single-step fan-out work and Workflows for multi-step processes that persist state across retries — mixing async patterns causes cascading failures if a single step fails source
-
Use Hyperdrive for all remote PostgreSQL/MySQL connections — every connection without Hyperdrive pays 300–500ms per request for TCP handshake and TLS negotiation source
-
Enable observability.enabled with head_sampling_rate before production deployment — without logs and traces, intermittent errors become undebuggable black boxes source
-
Always await or pass Promises to ctx.waitUntil() — floating promises are silently terminated by the runtime, causing swallowed errors and lost work source
-
Use Durable Objects with the Hibernation API for WebSocket connections — Workers alone cannot persist connections across isolate eviction source
-
Pass request-scoped state as function arguments only; never store it in module-level variables — Workers reuse isolates across requests, causing cross-request data leaks source
-
Use service bindings for Worker-to-Worker calls instead of HTTP to public URLs — service bindings are zero-cost, bypass the internet, and support type-safe RPC methods source
-
Use crypto.randomUUID() and crypto.getRandomValues() for security-sensitive tokens and IDs — Math.random() is predictable and unsuitable for cryptography source