Skip to content

Changelog

New updates and improvements at Cloudflare.

Agents SDK v0.7.0: Observability rewrite, keepAlive, and waitForMcpConnections

The latest release of the Agents SDK rewrites observability from scratch with diagnostics_channel, adds keepAlive() to prevent Durable Object eviction during long-running work, and introduces waitForMcpConnections so MCP tools are always available when onChatMessage runs.

Observability rewrite

The previous observability system used console.log() with a custom Observability.emit() interface. v0.7.0 replaces it with structured events published to diagnostics channels — silent by default, zero overhead when nobody is listening.

Every event has a type, payload, and timestamp. Events are routed to seven named channels:

Channel Event types
agents:state state:update
agents:rpc rpc, rpc:error
agents:message message:request, message:response, message:clear, message:cancel, message:error, tool:result, tool:approval
agents:schedule schedule:create, schedule:execute, schedule:cancel, schedule:retry, schedule:error, queue:retry, queue:error
agents:lifecycle connect, destroy
agents:workflow workflow:start, workflow:event, workflow:approved, workflow:rejected, workflow:terminated, workflow:paused, workflow:resumed, workflow:restarted
agents:mcp mcp:client:preconnect, mcp:client:connect, mcp:client:authorize, mcp:client:discover

Use the typed subscribe() helper from agents/observability for type-safe access:

import { subscribe } from "agents/observability";

const unsub = subscribe("rpc", (event) => {
	if (event.type === "rpc") {
		console.log(`RPC call: ${event.payload.method}`);
	}
	if (event.type === "rpc:error") {
		console.error(
			`RPC failed: ${event.payload.method} — ${event.payload.error}`,
		);
	}
});

// Clean up when done
unsub();
import { subscribe } from "agents/observability";

const unsub = subscribe("rpc", (event) => {
	if (event.type === "rpc") {
		console.log(`RPC call: ${event.payload.method}`);
	}
	if (event.type === "rpc:error") {
		console.error(
			`RPC failed: ${event.payload.method} — ${event.payload.error}`,
		);
	}
});

// Clean up when done
unsub();

In production, all diagnostics channel messages are automatically forwarded to Tail Workers — no subscription code needed in the agent itself:

export default {
	async tail(events) {
		for (const event of events) {
			for (const msg of event.diagnosticsChannelEvents) {
				// msg.channel is "agents:rpc", "agents:workflow", etc.
				console.log(msg.timestamp, msg.channel, msg.message);
			}
		}
	},
};
export default {
	async tail(events) {
		for (const event of events) {
			for (const msg of event.diagnosticsChannelEvents) {
				// msg.channel is "agents:rpc", "agents:workflow", etc.
				console.log(msg.timestamp, msg.channel, msg.message);
			}
		}
	},
};

The custom Observability override interface is still supported for users who need to filter or forward events to external services.

For the full event reference, refer to the Diagnostics channels documentation.

keepAlive() and keepAliveWhile()

Durable Objects are evicted after a period of inactivity (typically 70-140 seconds with no incoming requests, WebSocket messages, or alarms). During long-running operations — streaming LLM responses, waiting on external APIs, running multi-step computations — the agent can be evicted mid-flight.

keepAlive() prevents this by creating a 30-second heartbeat schedule. The alarm firing resets the inactivity timer. Returns a disposer function that cancels the heartbeat when called.

const dispose = await this.keepAlive();
try {
	const result = await longRunningComputation();
	await sendResults(result);
} finally {
	dispose();
}
const dispose = await this.keepAlive();
try {
	const result = await longRunningComputation();
	await sendResults(result);
} finally {
	dispose();
}

keepAliveWhile() wraps an async function with automatic cleanup — the heartbeat starts before the function runs and stops when it completes:

const result = await this.keepAliveWhile(async () => {
	const data = await longRunningComputation();
	return data;
});
const result = await this.keepAliveWhile(async () => {
	const data = await longRunningComputation();
	return data;
});

Key details:

  • Multiple concurrent callers — Each keepAlive() call returns an independent disposer. Disposing one does not affect others.
  • AIChatAgent built-inAIChatAgent automatically calls keepAlive() during streaming responses. You do not need to add it yourself.
  • Uses the scheduling system — The heartbeat does not conflict with your own schedules. It shows up in getSchedules() if you need to inspect it.

For the full API reference and when-to-use guidance, refer to Schedule tasks — Keeping the agent alive.

waitForMcpConnections

AIChatAgent now waits for MCP server connections to settle before calling onChatMessage. This ensures this.mcp.getAITools() returns the full set of tools, especially after Durable Object hibernation when connections are being restored in the background.

export class ChatAgent extends AIChatAgent {
	// Default — waits up to 10 seconds
	// waitForMcpConnections = { timeout: 10_000 };

	// Wait forever
	waitForMcpConnections = true;

	// Disable waiting
	waitForMcpConnections = false;
}
export class ChatAgent extends AIChatAgent {
	// Default — waits up to 10 seconds
	// waitForMcpConnections = { timeout: 10_000 };

	// Wait forever
	waitForMcpConnections = true;

	// Disable waiting
	waitForMcpConnections = false;
}
Value Behavior
{ timeout: 10_000 } Wait up to 10 seconds (default)
{ timeout: N } Wait up to N milliseconds
true Wait indefinitely until all connections ready
false Do not wait (old behavior before 0.2.0)

For lower-level control, call this.mcp.waitForConnections() directly inside onChatMessage instead.

Other improvements

  • MCP deduplication by name and URLaddMcpServer with HTTP transport now deduplicates on both server name and URL. Calling it with the same name but a different URL creates a new connection. URLs are normalized before comparison (trailing slashes, default ports, hostname case).
  • callbackHost optional for non-OAuth serversaddMcpServer no longer requires callbackHost when connecting to MCP servers that do not use OAuth.
  • MCP URL security — Server URLs are validated before connection to prevent SSRF. Private IP ranges, loopback addresses, link-local addresses, and cloud metadata endpoints are blocked.
  • Custom denial messagesaddToolOutput now supports state: "output-error" with errorText for custom denial messages in human-in-the-loop tool approval flows.
  • requestId in chat optionsonChatMessage options now include a requestId for logging and correlating events.

Upgrade

To update to the latest version:

npm i agents@latest @cloudflare/ai-chat@latest

Get started with AI Gateway automatically

You can now start using AI Gateway with a single API call — no setup required. Use default as your gateway ID, and AI Gateway creates one for you automatically on the first request.

To try it out, create an API token with AI Gateway - Read, AI Gateway - Edit, and Workers AI - Read permissions, then run:

curl -X POST https://gateway.ai.cloudflare.com/v1/$CLOUDFLARE_ACCOUNT_ID/default/compat/chat/completions \
  --header "cf-aig-authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",
    "messages": [
      {
        "role": "user",
        "content": "What is Cloudflare?"
      }
    ]
  }'

AI Gateway gives you logging, caching, rate limiting, and access to multiple AI providers through a single endpoint. For more information, refer to Get started.

Agents SDK v0.6.0: RPC transport for MCP, optional OAuth, hardened schema conversion, and @cloudflare/ai-chat fixes

The latest release of the Agents SDK lets you define an Agent and an McpAgent in the same Worker and connect them over RPC — no HTTP, no network overhead. It also makes OAuth opt-in for simple MCP connections, hardens the schema converter for production workloads, and ships a batch of @cloudflare/ai-chat reliability fixes.

RPC transport for MCP

You can now connect an Agent to an McpAgent in the same Worker using a Durable Object binding instead of an HTTP URL. The connection stays entirely within the Cloudflare runtime — no network round-trips, no serialization overhead.

Pass the Durable Object namespace directly to addMcpServer:

import { Agent } from "agents";

export class MyAgent extends Agent {
	async onStart() {
		// Connect via DO binding — no HTTP, no network overhead
		await this.addMcpServer("counter", env.MY_MCP);

		// With props for per-user context
		await this.addMcpServer("counter", env.MY_MCP, {
			props: { userId: "user-123", role: "admin" },
		});
	}
}
import { Agent } from "agents";

export class MyAgent extends Agent {
	async onStart() {
		// Connect via DO binding — no HTTP, no network overhead
		await this.addMcpServer("counter", env.MY_MCP);

		// With props for per-user context
		await this.addMcpServer("counter", env.MY_MCP, {
			props: { userId: "user-123", role: "admin" },
		});
	}
}

The addMcpServer method now accepts string | DurableObjectNamespace as the second parameter with full TypeScript overloads, so HTTP and RPC paths are type-safe and cannot be mixed.

Key capabilities:

  • Hibernation support — RPC connections survive Durable Object hibernation automatically. The binding name and props are persisted to storage and restored on wake-up, matching the behavior of HTTP MCP connections.
  • Deduplication — Calling addMcpServer with the same server name returns the existing connection instead of creating duplicates. Connection IDs are stable across hibernation restore.
  • Smaller surface area — The RPC transport internals have been rewritten and reduced from 609 lines to 245 lines. RPCServerTransport now uses JSONRPCMessageSchema from the MCP SDK for validation instead of hand-written checks.

Optional OAuth for MCP connections

addMcpServer() no longer eagerly creates an OAuth provider for every connection. For servers that do not require authentication, a simple call is all you need:

// No callbackHost, no OAuth config — just works
await this.addMcpServer("my-server", "https://mcp.example.com");
// No callbackHost, no OAuth config — just works
await this.addMcpServer("my-server", "https://mcp.example.com");

If the server responds with a 401, the SDK throws a clear error: "This MCP server requires OAuth authentication. Provide callbackHost in addMcpServer options to enable the OAuth flow." The restore-from-storage flow also handles missing callback URLs gracefully, skipping auth provider creation for non-OAuth servers.

Hardened JSON Schema to TypeScript converter

The schema converter used by generateTypes() and getAITools() now handles edge cases that previously caused crashes in production:

  • Depth and circular reference guards — Prevents stack overflows on recursive or deeply nested schemas
  • $ref resolution — Supports internal JSON Pointers (#/definitions/..., #/$defs/..., #)
  • Tuple supportprefixItems (JSON Schema 2020-12) and array items (draft-07)
  • OpenAPI 3.0 nullable: true — Supported across all schema branches
  • Per-tool error isolation — One malformed schema cannot crash the full pipeline in generateTypes() or getAITools()
  • Missing inputSchema fallbackgetAITools() falls back to { type: "object" } instead of throwing

@cloudflare/ai-chat fixes

  • Tool denial flow — Denied tool approvals (approved: false) now transition to output-denied with a tool_result, fixing Anthropic provider compatibility. Custom denial messages are supported via state: "output-error" and errorText.
  • Abort/cancel support — Streaming responses now properly cancel the reader loop when the abort signal fires and send a done signal to the client.
  • Duplicate message persistencepersistMessages() now reconciles assistant messages by content and order, preventing duplicate rows when clients resend full history.
  • requestId in OnChatMessageOptions — Handlers can now send properly-tagged error responses for pre-stream failures.
  • redacted_thinking preservation — The message sanitizer no longer strips Anthropic redacted_thinking blocks.
  • /get-messages reliability — Endpoint handling moved from a prototype onRequest() override to a constructor wrapper, so it works even when users override onRequest without calling super.onRequest().
  • Client tool APIs undeprecatedcreateToolsFromClientSchemas, clientTools, AITool, extractClientToolSchemas, and the tools option on useAgentChat are restored for SDK use cases where tools are defined dynamically at runtime.
  • jsonSchema initialization — Fixed jsonSchema not initialized error when calling getAITools() in onChatMessage.

Upgrade

To update to the latest version:

npm i agents@latest @cloudflare/ai-chat@latest

Run 15x more Containers with higher resource limits

You can now run more Containers concurrently with significantly higher limits on memory, vCPU, and disk.

Limit Previous Limit New Limit
Memory for concurrent live Container instances 400GiB 6TiB
vCPU for concurrent live Container instances 100 1,500
Disk for concurrent live Container instances 2TB 30TB

This 15x increase enables larger-scale workloads on Containers. You can now run 15,000 instances of the lite instance type, 6,000 instances of basic, over 1,500 instances of standard-1, or over 1,000 instances of standard-2 concurrently.

Refer to Limits for more details on the available instance types and limits.

Better Windows support for Python Workers

Pywrangler, the CLI tool for managing Python Workers and packages, now supports Windows, allowing you to develop and deploy Python Workers from Windows environments. Previously, Pywrangler was only available on macOS and Linux.

You can install and use Pywrangler on Windows the same way you would on other platforms. Specify your Worker's Python dependencies in your pyproject.toml file, then use the following commands to develop and deploy:

uvx --from workers-py pywrangler dev
uvx --from workers-py pywrangler deploy

All existing Pywrangler functionality, including package management, local development, and deployment, works on Windows without any additional configuration.

Requirements

This feature requires the following minimum versions:

  • wrangler >= 4.64.0
  • workers-py >= 1.72.0
  • uv >= 0.29.8

To upgrade workers-py (which includes Pywrangler) in your project, run:

uv tool upgrade workers-py

To upgrade wrangler, run:

npm install -g wrangler@latest

To upgrade uv, run:

uv self update

To get started with Python Workers on Windows, refer to the Python packages documentation for full details on Pywrangler.

Write structured queries to filter and search your Workers logs and traces

Workers Observability now includes a query language that lets you write structured queries directly in the search bar to filter your logs and traces. The search bar doubles as a free text search box — type any term to search across all metadata and attributes, or write field-level queries for precise filtering.

Workers Observability search bar with autocomplete suggestions and Query Builder sidebar filters

Queries written in the search bar sync with the Query Builder sidebar, so you can write a query by hand and then refine it visually, or build filters in the Query Builder and see the corresponding query syntax. The search bar provides autocomplete suggestions for metadata fields and operators as you type.

The query language supports:

  • Free text search — search everywhere with a keyword like error, or match an exact phrase with "exact phrase"
  • Field queries — filter by specific fields using comparison operators (for example, status = 500 or $workers.wallTimeMs > 100)
  • Operators=, !=, >, >=, <, <=, and : (contains)
  • Functionscontains(field, value), startsWith(field, prefix), regex(field, pattern), and exists(field)
  • Boolean logic — add conditions with AND, OR, and NOT

Select the help icon next to the search bar to view the full syntax reference, including all supported operators, functions, and keyboard shortcuts.

Go to the Workers Observability dashboard to try the query language.

No config? No problem. Just `wrangler deploy`

You can now deploy any existing project to Cloudflare Workers — even without a Wrangler configuration file — and wrangler deploy will just work.

Starting with Wrangler 4.68.0, running wrangler deploy automatically configures your project by detecting your framework, installing required adapters, and deploying it to Cloudflare Workers.

Using Wrangler locally

npx wrangler deploy

When you run wrangler deploy in a project without a configuration file, Wrangler:

  1. Detects your framework from package.json
  2. Prompts you to confirm the detected settings
  3. Installs any required adapters
  4. Generates a wrangler.jsonc configuration file
  5. Deploys your project to Cloudflare Workers

You can also use wrangler setup to configure without deploying, or pass --yes to skip prompts.

Using the Cloudflare dashboard

Automatic configuration pull request created by Workers Builds

When you connect a repository through the Workers dashboard, a pull request is generated for you with all necessary files, and a preview deployment to check before merging.

Background

In December 2025, we introduced automatic configuration as an experimental feature. It is now generally available and the default behavior.

If you have questions or run into issues, join the GitHub discussion.

deleteAll() now deletes Durable Object alarm

deleteAll() now deletes a Durable Object alarm in addition to stored data for Workers with a compatibility date of 2026-02-24 or later. This change simplifies clearing a Durable Object's storage with a single API call.

Previously, deleteAll() only deleted user-stored data for an object. Alarm usage stores metadata in an object's storage, which required a separate deleteAlarm() call to fully clean up all storage for an object. The deleteAll() change applies to both KV-backed and SQLite-backed Durable Objects.

// Before: two API calls required to clear all storage
await this.ctx.storage.deleteAlarm();
await this.ctx.storage.deleteAll();

// Now: a single call clears both data and the alarm
await this.ctx.storage.deleteAll();

For more information, refer to the Storage API documentation.

Dropped event metrics, typed Pipelines bindings, and improved setup

Cloudflare Pipelines ingests streaming data via Workers or HTTP endpoints, transforms it with SQL, and writes it to R2 as Apache Iceberg tables. Today we're shipping three improvements to help you understand why streaming events get dropped, catch data quality issues early, and set up Pipelines faster.

Dropped event metrics

When stream events don't match the expected schema, Pipelines accepts them during ingestion but drops them when attempting to deliver them to the sink. To help you identify the root cause of these issues, we are introducing a new dashboard and metrics that surface dropped events with detailed error messages.

The Errors tab in the Cloudflare dashboard showing deserialization errors grouped by type with individual error details

Dropped events can also be queried programmatically via the new pipelinesUserErrorsAdaptiveGroups GraphQL dataset. The dataset breaks down failures by specific error type (missing_field, type_mismatch, parse_failure, or null_value) so you can trace issues back to the source.

query GetPipelineUserErrors(
	$accountTag: String!
	$pipelineId: String!
	$datetimeStart: Time!
	$datetimeEnd: Time!
) {
	viewer {
		accounts(filter: { accountTag: $accountTag }) {
			pipelinesUserErrorsAdaptiveGroups(
				limit: 100
				filter: {
					pipelineId: $pipelineId
					datetime_geq: $datetimeStart
					datetime_leq: $datetimeEnd
				}
				orderBy: [count_DESC]
			) {
				count
				dimensions {
					errorFamily
					errorType
				}
			}
		}
	}
}

For the full list of dimensions, error types, and additional query examples, refer to User error metrics.

Typed Pipelines bindings

Sending data to a Pipeline from a Worker previously used a generic Pipeline<PipelineRecord> type, which meant schema mismatches (wrong field names, incorrect types) were only caught at runtime as dropped events.

Running wrangler types now generates schema-specific TypeScript types for your Pipeline bindings. TypeScript catches missing required fields and incorrect field types at compile time, before your code is deployed.

declare namespace Cloudflare {
	type EcommerceStreamRecord = {
		user_id: string;
		event_type: string;
		product_id?: string;
		amount?: number;
	};
	interface Env {
		STREAM: import("cloudflare:pipelines").Pipeline<Cloudflare.EcommerceStreamRecord>;
	}
}

For more information, refer to Typed Pipeline bindings.

Improved Pipelines setup

Setting up a new Pipeline previously required multiple manual steps: creating an R2 bucket, enabling R2 Data Catalog, generating an API token, and configuring format, compression, and rolling policies individually.

The wrangler pipelines setup command now offers a Simple setup mode that applies recommended defaults and automatically creates the R2 bucket and enables R2 Data Catalog if they do not already exist. Validation errors during setup prompt you to retry inline rather than restarting the entire process.

For a full walkthrough, refer to the Getting started guide.

Stream live inputs can now be disabled and enabled

You can now disable a live input to reject incoming RTMPS and SRT connections. When a live input is disabled, any broadcast attempts will fail to connect.

This gives you more control over your live inputs:

  • Temporarily pause an input without deleting it
  • Programmatically end creator broadcasts
  • Prevent new broadcasts from starting on a specific input

To disable a live input via the API, set the enabled property to false:

curl --request PUT \
https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/live_inputs/{input_id} \
--header "Authorization: Bearer <API_TOKEN>" \
--data '{"enabled": false}'

You can also disable or enable a live input from the Live inputs list page or the live input detail page in the Dashboard.

All existing live inputs remain enabled by default. For more information, refer to Start a live stream.

Backup and restore API for Sandbox SDK

Sandboxes now support createBackup() and restoreBackup() methods for creating and restoring point-in-time snapshots of directories.

This allows you to restore environments quickly. For instance, in order to develop in a sandbox, you may need to include a user's codebase and run a build step. Unfortunately git clone and npm install can take minutes, and you don't want to run these steps every time the user starts their sandbox.

Now, after the initial setup, you can just call createBackup(), then restoreBackup() the next time this environment is needed. This makes it practical to pick up exactly where a user left off, even after days of inactivity, without repeating expensive setup steps.

const sandbox = getSandbox(env.Sandbox, "my-sandbox");

// Make non-trivial changes to the file system
await sandbox.gitCheckout(endUserRepo, { targetDir: "/workspace" });
await sandbox.exec("npm install", { cwd: "/workspace" });

// Create a point-in-time backup of the directory
const backup = await sandbox.createBackup({ dir: "/workspace" });

// Store the handle for later use
await env.KV.put(`backup:${userId}`, JSON.stringify(backup));

// ... in a future session...

// Restore instead of re-cloning and reinstalling
await sandbox.restoreBackup(backup);

Backups are stored in R2 and can take advantage of R2 object lifecycle rules to ensure they do not persist forever.

Key capabilities:

  • Persist and reuse across sandbox sessions — Easily store backup handles in KV, D1, or Durable Object storage for use in subsequent sessions
  • Usable across multiple instances — Fork a backup across many sandboxes for parallel work
  • Named backups — Provide optional human-readable labels for easier management
  • TTLs — Set time-to-live durations so backups are automatically removed from storage once they are no longer needed

To get started, refer to the backup and restore guide for setup instructions and usage patterns, or the Backups API reference for full method documentation.

Hyperdrive no longer caches queries using STABLE PostgreSQL functions

Hyperdrive now treats queries containing PostgreSQL STABLE functions as uncacheable, in addition to VOLATILE functions.

Previously, only functions that PostgreSQL categorizes as VOLATILE (for example, RANDOM(), LASTVAL()) were detected as uncacheable. STABLE functions (for example, NOW(), CURRENT_TIMESTAMP, CURRENT_DATE) were incorrectly allowed to be cached.

Because STABLE functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics.

If your queries use STABLE functions, and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of WHERE created_at > NOW(), compute the timestamp in your Worker and pass it as WHERE created_at > $1.

Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like NOW() in SQL comments also cause the query to be marked as uncacheable.

For more information, refer to Query caching and Troubleshoot and debug.

@cloudflare/codemode v0.1.0: a new runtime agnostic modular architecture

The @cloudflare/codemode package has been rewritten into a modular, runtime-agnostic SDK.

Code Mode enables LLMs to write and execute code that orchestrates your tools, instead of calling them one at a time. This can (and does) yield significant token savings, reduces context window pressure and improves overall model performance on a task.

The new Executor interface is runtime agnostic and comes with a prebuilt DynamicWorkerExecutor to run generated code in a Dynamic Worker Loader.

Breaking changes

  • Removed experimental_codemode() and CodeModeProxy — the package no longer owns an LLM call or model choice
  • New import path: createCodeTool() is now exported from @cloudflare/codemode/ai

New features

  • createCodeTool() — Returns a standard AI SDK Tool to use in your AI agents.
  • Executor interface — Minimal execute(code, fns) contract. Implement for any code sandboxing primitive or runtime.

DynamicWorkerExecutor

Runs code in a Dynamic Worker. It comes with the following features:

  • Network isolationfetch() and connect() blocked by default (globalOutbound: null) when using DynamicWorkerExecutor
  • Console captureconsole.log/warn/error captured and returned in ExecuteResult.logs
  • Execution timeout — Configurable via timeout option (default 30s)

Usage

import { createCodeTool } from "@cloudflare/codemode/ai";
import { DynamicWorkerExecutor } from "@cloudflare/codemode";
import { streamText } from "ai";

const executor = new DynamicWorkerExecutor({ loader: env.LOADER });
const codemode = createCodeTool({ tools: myTools, executor });

const result = streamText({
	model,
	tools: { codemode },
	messages,
});
import { createCodeTool } from "@cloudflare/codemode/ai";
import { DynamicWorkerExecutor } from "@cloudflare/codemode";
import { streamText } from "ai";

const executor = new DynamicWorkerExecutor({ loader: env.LOADER });
const codemode = createCodeTool({ tools: myTools, executor });

const result = streamText({
	model,
	tools: { codemode },
	messages,
});

Wrangler configuration

{
	"worker_loaders": [{ "binding": "LOADER" }],
}
[[worker_loaders]]
binding = "LOADER"

See the Code Mode documentation for full API reference and examples.

Upgrade

npm i @cloudflare/codemode@latest

Manage Cloudflare Tunnel directly from the main Cloudflare Dashboard

Cloudflare Tunnel is now available in the main Cloudflare Dashboard at Networking > Tunnels, bringing first-class Tunnel management to developers using Tunnel for securing origin servers.

Manage Tunnels in the Core Dashboard

This new experience provides everything you need to manage Tunnels for public applications, including:

Choose the right dashboard for your use case

Core Dashboard: Navigate to Networking > Tunnels to manage Tunnels for:

Cloudflare One Dashboard: Navigate to Zero Trust > Networks > Connectors to manage Tunnels for:

Both dashboards provide complete Tunnel management capabilities — choose based on your primary workflow.

Get started

New to Tunnel? Learn how to get started with Cloudflare Tunnel or explore advanced use cases like securing SSH servers or running Tunnels in Kubernetes.

AI dashboard experience improvements

Workers AI and AI Gateway have received a series of dashboard improvements to help you get started faster and manage your AI workloads more easily.

Navigation and discoverability

AI now has its own top-level section in the Cloudflare dashboard sidebar, so you can find AI features without digging through menus.

AI sidebar navigation in the Cloudflare dashboard The new top-level AI section in the dashboard sidebar.

Onboarding and getting started

Getting started with AI Gateway is now simpler. When you create your first gateway, we now show your gateway's OpenAI-compatible endpoint and step-by-step guidance to help you configure it. The Playground also includes helpful prompts, and usage pages have clear next steps if you have not made any requests yet.

AI Gateway onboarding flow The first-run setup experience for new gateways.

We've also combined the previously separate code example sections into one view with dropdown selectors for API type, provider, SDK, and authentication method so you can now customize the exact code snippet you need from one place.

Dynamic Routing

  • The route builder is now more performant and responsive.
  • You can now copy route names to your clipboard with a single click.
  • Code examples use the Universal Endpoint format, making it easier to integrate routes into your application.

Observability and analytics

  • Small monetary values now display correctly in cost analytics charts, so you can accurately track spending at any scale.

Accessibility

  • Improvements to keyboard navigation within the AI Gateway, specifically when exploring usage by provider.
  • Improvements to sorting and filtering components on the Workers AI models page.

For more information, refer to the AI Gateway documentation.

Agents SDK v0.5.0: Protocol message control, retry utilities, data parts, and @cloudflare/ai-chat v0.1.0

The latest release of the Agents SDK adds built-in retry utilities, per-connection protocol message control, and a fully rewritten @cloudflare/ai-chat with data parts, tool approval persistence, and zero breaking changes.

Retry utilities

A new this.retry() method lets you retry any async operation with exponential backoff and jitter. You can pass an optional shouldRetry predicate to bail early on non-retryable errors.

class MyAgent extends Agent {
	async onRequest(request) {
		const data = await this.retry(() => callUnreliableService(), {
			maxAttempts: 4,
			shouldRetry: (err) => !(err instanceof PermanentError),
		});
		return Response.json(data);
	}
}
class MyAgent extends Agent {
	async onRequest(request: Request) {
		const data = await this.retry(() => callUnreliableService(), {
			maxAttempts: 4,
			shouldRetry: (err) => !(err instanceof PermanentError),
		});
		return Response.json(data);
	}
}

Retry options are also available per-task on queue(), schedule(), scheduleEvery(), and addMcpServer():

// Per-task retry configuration, persisted in SQLite alongside the task
await this.schedule(
	Date.now() + 60_000,
	"sendReport",
	{ userId: "abc" },
	{
		retry: { maxAttempts: 5 },
	},
);

// Class-level retry defaults
class MyAgent extends Agent {
	static options = {
		retry: { maxAttempts: 3 },
	};
}
// Per-task retry configuration, persisted in SQLite alongside the task
await this.schedule(Date.now() + 60_000, "sendReport", { userId: "abc" }, {
	retry: { maxAttempts: 5 },
});

// Class-level retry defaults
class MyAgent extends Agent {
	static options = {
		retry: { maxAttempts: 3 },
	};
}

Retry options are validated eagerly at enqueue/schedule time, and invalid values throw immediately. Internal retries have also been added for workflow operations (terminateWorkflow, pauseWorkflow, and others) with Durable Object-aware error detection.

Per-connection protocol message control

Agents automatically send JSON text frames (identity, state, MCP server lists) to every WebSocket connection. You can now suppress these per-connection for clients that cannot handle them — binary-only devices, MQTT clients, or lightweight embedded systems.

class MyAgent extends Agent {
	shouldSendProtocolMessages(connection, ctx) {
		// Suppress protocol messages for MQTT clients
		const subprotocol = ctx.request.headers.get("Sec-WebSocket-Protocol");
		return subprotocol !== "mqtt";
	}
}
class MyAgent extends Agent {
	shouldSendProtocolMessages(connection: Connection, ctx: ConnectionContext) {
		// Suppress protocol messages for MQTT clients
		const subprotocol = ctx.request.headers.get("Sec-WebSocket-Protocol");
		return subprotocol !== "mqtt";
	}
}

Connections with protocol messages disabled still fully participate in RPC and regular messaging. Use isConnectionProtocolEnabled(connection) to check a connection's status at any time. The flag persists across Durable Object hibernation.

See Protocol messages for full documentation.

@cloudflare/ai-chat v0.1.0

The first stable release of @cloudflare/ai-chat ships alongside this release with a major refactor of AIChatAgent internals — new ResumableStream class, WebSocket ChatTransport, and simplified SSE parsing — with zero breaking changes. Existing code using AIChatAgent and useAgentChat works as-is.

Key new features:

  • Data parts — Attach typed JSON blobs (data-*) to messages alongside text. Supports reconciliation (type+id updates in-place), append, and transient parts (ephemeral via onData callback). See Data parts.
  • Tool approval persistence — The needsApproval approval UI now survives page refresh and DO hibernation. The streaming message is persisted to SQLite when a tool enters approval-requested state.
  • maxPersistedMessages — Cap SQLite message storage with automatic oldest-message deletion.
  • body option on useAgentChat — Send custom data with every request (static or dynamic).
  • Incremental persistence — Hash-based cache to skip redundant SQL writes.
  • Row size guard — Automatic two-pass compaction when messages approach the SQLite 2 MB limit.
  • autoContinueAfterToolResult defaults to true — Client-side tool results and tool approvals now automatically trigger a server continuation, matching server-executed tool behavior. Set autoContinueAfterToolResult: false in useAgentChat to restore the previous behavior.

Notable bug fixes:

  • Resolved stream resumption race conditions
  • Resolved an issue where setMessages functional updater sent empty arrays
  • Resolved an issue where client tool schemas were lost after DO hibernation
  • Resolved InvalidPromptError after tool approval (approval.id was dropped)
  • Resolved an issue where message metadata was not propagated on broadcast/resume paths
  • Resolved an issue where clearAll() did not clear in-memory chunk buffers
  • Resolved an issue where reasoning-delta silently dropped data when reasoning-start was missed during stream resumption

Synchronous queue and schedule getters

getQueue(), getQueues(), getSchedule(), dequeue(), dequeueAll(), and dequeueAllByCallback() were unnecessarily async despite only performing synchronous SQL operations. They now return values directly instead of wrapping them in Promises. This is backward compatible — existing code using await on these methods will continue to work.

Other improvements

  • Fix TypeScript "excessively deep" error — A depth counter on CanSerialize and IsSerializableParam types bails out to true after 10 levels of recursion, preventing the "Type instantiation is excessively deep" error with deeply nested types like AI SDK CoreMessage[].
  • POST SSE keepalive — The POST SSE handler now sends event: ping every 30 seconds to keep the connection alive, matching the existing GET SSE handler behavior. This prevents POST response streams from being silently dropped by proxies during long-running tool calls.
  • Widened peer dependency ranges — Peer dependency ranges across packages have been widened to prevent cascading major bumps during 0.x minor releases. @cloudflare/ai-chat and @cloudflare/codemode are now marked as optional peer dependencies.

Upgrade

To update to the latest version:

npm i agents@latest @cloudflare/ai-chat@latest

Docker-in-Docker support added to Containers and Sandboxes

Sandboxes and Containers now support running Docker for "Docker-in-Docker" setups. This is particularly useful when your end users or agents want to run a full sandboxed development environment.

This allows you to:

  • Develop containerized applications with your Sandbox
  • Run isolated test environments for images
  • Build container images as part of CI/CD workflows
  • Deploy arbitrary images supplied at runtime within a container

For Sandbox SDK users, see the Docker-in-Docker guide for instructions on combining Docker with the SandboxSDK. For general Containers usage, see the Containers FAQ.

Quick Editor devtools replaced with log viewer

Cloudflare has deprecated the Workers Quick Editor dev tools inspector and replaced it with a lightweight log viewer.

This aligns our logging with wrangler tail and gives us the opportunity to focus our efforts on bringing benefits from the work we have invested in observability, which would not be possible otherwise.

We have made improvements to this logging viewer based on your feedback such that you can log object and array types, and easily clear the list of logs. This does not include class instances. Limitations are documented in the Workers Playground docs.

If you do need to develop your Worker with a remote inspector, you can still do this using Wrangler locally. Cloning a project from your quick editor to your computer for local development can be done with the wrangler init --from-dash command. For more information, refer to Wrangler commands.

New Best Practices guide for Workers

A new Workers Best Practices guide provides opinionated recommendations for building fast, reliable, observable, and secure Workers. The guide draws on production patterns, Cloudflare internal usage, and best practices observed from developers building on Workers.

Key guidance includes:

  • Keep your compatibility date current and enable nodejs_compat — Ensure you have access to the latest runtime features and Node.js built-in modules.
{
	"name": "my-worker",
	"main": "src/index.ts",
	// Set this to today's date
	"compatibility_date": "2026-08-16",
	"compatibility_flags": ["nodejs_compat"],
}
name = "my-worker"
main = "src/index.ts"
# Set this to today's date
compatibility_date = "2026-08-16"
compatibility_flags = [ "nodejs_compat" ]
  • Generate binding types with wrangler types — Never hand-write your Env interface. Let Wrangler generate it from your actual configuration to catch mismatches at compile time.
  • Stream request and response bodies — Avoid buffering large payloads in memory. Use TransformStream and pipeTo to stay within the 128 MB memory limit and improve time-to-first-byte.
  • Use bindings, not REST APIs — Bindings to KV, R2, D1, Queues, and other Cloudflare services are direct, in-process references with no network hop and no authentication overhead.
  • Use Queues and Workflows for background work — Move long-running or retriable tasks out of the critical request path. Use Queues for simple fan-out and buffering, and Workflows for multi-step durable processes.
  • Enable Workers Logs and Traces — Configure observability before deploying to production so you have data when you need to debug.
  • Avoid global mutable state — Workers reuse isolates across requests. Storing request-scoped data in module-level variables causes cross-request data leaks.
  • Always await or waitUntil your Promises — Floating promises cause silent bugs and dropped work.
  • Use Web Crypto for secure token generation — Never use Math.random() for security-sensitive operations.

To learn more, refer to Workers Best Practices.

Cloudflare Python SDK v5.0.0-beta.1 now available

Disclaimer: Please note that v5.0.0-beta.1 is in Beta and we are still testing it for stability.

Full Changelog: v4.3.1...v5.0.0-beta.1

In this release, you'll see a large number of breaking changes. This is primarily due to a change in OpenAPI definitions, which our libraries are based off of, and codegen updates that we rely on to read those OpenAPI definitions and produce our SDK libraries. As the codegen is always evolving and improving, so are our code bases.

There may be changes that are not captured in this changelog. Feel free to open an issue to report any inaccuracies, and we will make sure it gets into the changelog before the v5.0.0 release.

Most of the breaking changes below are caused by improvements to the accuracy of the base OpenAPI schemas, which sometimes translates to breaking changes in downstream clients that depend on those schemas.

Please ensure you read through the list of changes below and the migration guide before moving to this version - this will help you understand any down or upstream issues it may cause to your environments.

Breaking Changes

The following resources have breaking changes. See the v5 Migration Guide for detailed migration instructions.

  • abusereports
  • acm.totaltls
  • apigateway.configurations
  • cloudforceone.threatevents
  • d1.database
  • intel.indicatorfeeds
  • logpush.edge
  • origintlsclientauth.hostnames
  • queues.consumers
  • radar.bgp
  • rulesets.rules
  • schemavalidation.schemas
  • snippets
  • zerotrust.dlp
  • zerotrust.networks

Features

New API Resources

  • abusereports - Abuse report management
  • abusereports.mitigations - Abuse report mitigation actions
  • ai.tomarkdown - AI-powered markdown conversion
  • aigateway.dynamicrouting - AI Gateway dynamic routing configuration
  • aigateway.providerconfigs - AI Gateway provider configurations
  • aisearch - AI-powered search functionality
  • aisearch.instances - AI Search instance management
  • aisearch.tokens - AI Search authentication tokens
  • alerting.silences - Alert silence management
  • brandprotection.logomatches - Brand protection logo match detection
  • brandprotection.logos - Brand protection logo management
  • brandprotection.matches - Brand protection match results
  • brandprotection.queries - Brand protection query management
  • cloudforceone.binarystorage - CloudForce One binary storage
  • connectivity.directory - Connectivity directory services
  • d1.database - D1 database management
  • diagnostics.endpointhealthchecks - Endpoint health check diagnostics
  • fraud - Fraud detection and prevention
  • iam.sso - IAM Single Sign-On configuration
  • loadbalancers.monitorgroups - Load balancer monitor groups
  • organizations - Organization management
  • organizations.organizationprofile - Organization profile settings
  • origintlsclientauth.hostnamecertificates - Origin TLS client auth hostname certificates
  • origintlsclientauth.hostnames - Origin TLS client auth hostnames
  • origintlsclientauth.zonecertificates - Origin TLS client auth zone certificates
  • pipelines - Data pipeline management
  • pipelines.sinks - Pipeline sink configurations
  • pipelines.streams - Pipeline stream configurations
  • queues.subscriptions - Queue subscription management
  • r2datacatalog - R2 Data Catalog integration
  • r2datacatalog.credentials - R2 Data Catalog credentials
  • r2datacatalog.maintenanceconfigs - R2 Data Catalog maintenance configurations
  • r2datacatalog.namespaces - R2 Data Catalog namespaces
  • radar.bots - Radar bot analytics
  • radar.ct - Radar certificate transparency data
  • radar.geolocations - Radar geolocation data
  • realtimekit.activesession - Real-time Kit active session management
  • realtimekit.analytics - Real-time Kit analytics
  • realtimekit.apps - Real-time Kit application management
  • realtimekit.livestreams - Real-time Kit live streaming
  • realtimekit.meetings - Real-time Kit meeting management
  • realtimekit.presets - Real-time Kit preset configurations
  • realtimekit.recordings - Real-time Kit recording management
  • realtimekit.sessions - Real-time Kit session management
  • realtimekit.webhooks - Real-time Kit webhook configurations
  • tokenvalidation.configuration - Token validation configuration
  • tokenvalidation.rules - Token validation rules
  • workers.beta - Workers beta features

New Endpoints (Existing Resources)

acm.totaltls

  • edit()
  • update()

cloudforceone.threatevents

  • list()

contentscanning

  • create()
  • get()
  • update()

dns.records

  • scan_list()
  • scan_review()
  • scan_trigger()

intel.indicatorfeeds

  • create()
  • delete()
  • list()

leakedcredentialchecks.detections

  • get()

queues.consumers

  • list()

radar.ai

  • summary()
  • timeseries()
  • timeseries_groups()

radar.bgp

  • changes()
  • snapshot()

workers.subdomains

  • delete()

zerotrust.networks

  • create()
  • delete()
  • edit()
  • get()
  • list()

General Fixes and Improvements

Type System & Compatibility

  • Type inference improvements: Allow Pyright to properly infer TypedDict types within SequenceNotStr
  • Type completeness: Add missing types to method arguments and response models
  • Pydantic compatibility: Ensure compatibility with Pydantic versions prior to 2.8.0 when using additional fields

Request/Response Handling

  • Multipart form data: Correctly handle sending multipart/form-data requests with JSON data
  • Header handling: Do not send headers with default values set to omit
  • GET request headers: Don't send Content-Type header on GET requests
  • Response body model accuracy: Broad improvements to the correctness of models

Parsing & Data Processing

  • Discriminated unions: Correctly handle nested discriminated unions in response parsing
  • Extra field types: Parse extra field types correctly
  • Empty metadata: Ignore empty metadata fields during parsing
  • Singularization rules: Update resource name singularization rules for better consistency

Introducing GLM-4.7-Flash on Workers AI, @cloudflare/tanstack-ai, and workers-ai-provider v3.1.1

We're excited to announce GLM-4.7-Flash on Workers AI, a fast and efficient text generation model optimized for multilingual dialogue and instruction-following tasks, along with the brand-new @cloudflare/tanstack-ai package and workers-ai-provider v3.1.1.

You can now run AI agents entirely on Cloudflare. With GLM-4.7-Flash's multi-turn tool calling support, plus full compatibility with TanStack AI and the Vercel AI SDK, you have everything you need to build agentic applications that run completely at the edge.

GLM-4.7-Flash — Multilingual Text Generation Model

@cf/zai-org/glm-4.7-flash is a multilingual model with a 131,072 token context window, making it ideal for long-form content generation, complex reasoning tasks, and multilingual applications.

Key Features and Use Cases:

  • Multi-turn Tool Calling for Agents: Build AI agents that can call functions and tools across multiple conversation turns
  • Multilingual Support: Built to handle content generation in multiple languages effectively
  • Large Context Window: 131,072 tokens for long-form writing, complex reasoning, and processing long documents
  • Fast Inference: Optimized for low-latency responses in chatbots and virtual assistants
  • Instruction Following: Excellent at following complex instructions for code generation and structured tasks

Use GLM-4.7-Flash through the Workers AI binding (env.AI.run()), the REST API at /run or /v1/chat/completions, AI Gateway, or via workers-ai-provider for the Vercel AI SDK.

Pricing is available on the model page or pricing page.

@cloudflare/tanstack-ai v0.1.1 — TanStack AI adapters for Workers AI and AI Gateway

We've released @cloudflare/tanstack-ai, a new package that brings Workers AI and AI Gateway support to TanStack AI. This provides a framework-agnostic alternative for developers who prefer TanStack's approach to building AI applications.

Workers AI adapters support four configuration modes — plain binding (env.AI), plain REST, AI Gateway binding (env.AI.gateway(id)), and AI Gateway REST — across all capabilities:

  • Chat (createWorkersAiChat) — Streaming chat completions with tool calling, structured output, and reasoning text streaming.
  • Image generation (createWorkersAiImage) — Text-to-image models.
  • Transcription (createWorkersAiTranscription) — Speech-to-text.
  • Text-to-speech (createWorkersAiTts) — Audio generation.
  • Summarization (createWorkersAiSummarize) — Text summarization.

AI Gateway adapters route requests from third-party providers — OpenAI, Anthropic, Gemini, Grok, and OpenRouter — through Cloudflare AI Gateway for caching, rate limiting, and unified billing.

To get started:

npm install @cloudflare/tanstack-ai @tanstack/ai

workers-ai-provider v3.1.1 — transcription, speech, reranking, and reliability

The Workers AI provider for the Vercel AI SDK now supports three new capabilities beyond chat and image generation:

  • Transcription (provider.transcription(model)) — Speech-to-text with automatic handling of model-specific input formats across binding and REST paths.
  • Text-to-speech (provider.speech(model)) — Audio generation with support for voice and speed options.
  • Reranking (provider.reranking(model)) — Document reranking for RAG pipelines and search result ordering.
import { createWorkersAI } from "workers-ai-provider";
import {
	experimental_transcribe,
	experimental_generateSpeech,
	rerank,
} from "ai";

const workersai = createWorkersAI({ binding: env.AI });

const transcript = await experimental_transcribe({
	model: workersai.transcription("@cf/openai/whisper-large-v3-turbo"),
	audio: audioData,
	mediaType: "audio/wav",
});

const speech = await experimental_generateSpeech({
	model: workersai.speech("@cf/deepgram/aura-1"),
	text: "Hello world",
	voice: "asteria",
});

const ranked = await rerank({
	model: workersai.reranking("@cf/baai/bge-reranker-base"),
	query: "What is machine learning?",
	documents: ["ML is a branch of AI.", "The weather is sunny."],
});

This release also includes a comprehensive reliability overhaul (v3.0.5):

  • Fixed streaming — Responses now stream token-by-token instead of buffering all chunks, using a proper TransformStream pipeline with backpressure.
  • Fixed tool calling — Resolved issues with tool call ID sanitization, conversation history preservation, and a heuristic that silently fell back to non-streaming mode when tools were defined.
  • Premature stream termination detection — Streams that end unexpectedly now report finishReason: "error" instead of silently reporting "stop".
  • AI Search support — Added createAISearch as the canonical export (renamed from AutoRAG). createAutoRAG still works with a deprecation warning.

To upgrade:

npm install workers-ai-provider@latest ai

Resources

Origin CA certificate support for Workers VPC

Workers VPC now supports Cloudflare Origin CA certificates when connecting to your private services over HTTPS. Previously, Workers VPC only trusted certificates issued by publicly trusted certificate authorities (for example, Let's Encrypt, DigiCert).

With this change, you can use free Cloudflare Origin CA certificates on your origin servers within private networks and connect to them from Workers VPC using the https scheme. This is useful for encrypting traffic between the tunnel and your service without needing to provision certificates from a public CA.

For more information, refer to Supported TLS certificates.

Terraform v5.17.0 now available

In January 2025, we announced the launch of the new Terraform v5 Provider. We greatly appreciate the proactive engagement and valuable feedback from the Cloudflare community following the v5 release. In response, we have established a consistent and rapid 2-3 week cadence for releasing targeted improvements, demonstrating our commitment to stability and reliability.

With the help of the community, we have a growing number of resources that we have marked as stable, with that list continuing to grow with every release. The most used resources are on track to be stable by the end of March 2026, when we will also be releasing a new migration tool to help you migrate from v4 to v5 with ease.

This release brings new capabilities for AI Search, enhanced Workers Script placement controls, and numerous bug fixes based on community feedback. We also begun laying foundational work for improving the v4 to v5 migration process. Stay tuned for more details as we approach the March 2026 release timeline.

Thank you for continuing to raise issues. They make our provider stronger and help us build products that reflect your needs.

Features

  • ai_search_instance: add data source for querying AI Search instances
  • ai_search_token: add data source for querying AI Search tokens
  • account: add support for tenant unit management with new unit field
  • account: add automatic mapping from managed_by.parent_org_id to unit.id
  • authenticated_origin_pulls_certificate: add data source for querying authenticated origin pull certificates
  • authenticated_origin_pulls_hostname_certificate: add data source for querying hostname-specific authenticated origin pull certificates
  • authenticated_origin_pulls_settings: add data source for querying authenticated origin pull settings
  • workers_kv: add value field to data source to retrieve KV values directly
  • workers_script: add script field to data source to retrieve script content
  • workers_script: add support for simple rate limit binding
  • workers_script: add support for targeted placement mode with placement.target array for specifying placement targets (region, hostname, host)
  • workers_script: add placement_mode and placement_status computed fields
  • zero_trust_dex_test: add data source with filter support for finding specific tests
  • zero_trust_dlp_predefined_profile: add enabled_entries field for flexible entry management

Bug Fixes

  • account: map managed_by.parent_org_id to unit.id in unmarshall and add acceptance tests
  • authenticated_origin_pulls_certificate: add certificate normalization to prevent drift
  • authenticated_origin_pulls: handle array response and implement full lifecycle
  • authenticated_origin_pulls_hostname_certificate: fix resource and tests
  • cloudforce_one_request_message: use correct request_id field instead of id in API calls
  • dns_zone_transfers_incoming: use correct zone_id field instead of id in API calls
  • dns_zone_transfers_outgoing: use correct zone_id field instead of id in API calls
  • email_routing_settings: use correct zone_id field instead of id in API calls
  • hyperdrive_config: add proper handling for write-only fields to prevent state drift
  • hyperdrive_config: add normalization for empty mtls objects to prevent unnecessary diffs
  • magic_network_monitoring_rule: use correct account_id field instead of id in API calls
  • mtls_certificates: fix resource and test
  • pages_project: revert build_config to computed optional
  • stream_key: use correct account_id field instead of id in API calls
  • total_tls: use upsert pattern for singleton zone setting
  • waiting_room_rules: use correct waiting_room_id field instead of id in API calls
  • workers_script: add support for placement mode/status
  • zero_trust_access_application: update v4 version on migration tests
  • zero_trust_device_posture_rule: update tests to match API
  • zero_trust_dlp_integration_entry: use correct entry_id field instead of id in API calls
  • zero_trust_dlp_predefined_entry: use correct entry_id field instead of id in API calls
  • zero_trust_organization: fix plan issues

Chores

  • add state upgraders to 95+ resources to lay the foundation for replacing Grit (still under active development)
  • certificate_pack: add state migration handler for SDKv2 to Framework conversion
  • custom_hostname_fallback_origin: add comprehensive lifecycle test and migration support
  • dns_record: add state migration handler for SDKv2 to Framework conversion
  • leaked_credential_check: add import functionality and tests
  • load_balancer_pool: add state migration handler with detection for v4 vs v5 format
  • pages_project: add state migration handlers
  • tiered_cache: add state migration handlers
  • zero_trust_dlp_predefined_profile: deprecate entries field in favor of enabled_entries

For more information

Workers are no longer limited to 1000 subrequests

Workers no longer have a limit of 1000 subrequests per invocation, allowing you to make more fetch() calls or requests to Cloudflare services on every incoming request. This is especially important for long-running Workers requests, such as open websockets on Durable Objects or long-running Workflows, as these could often exceed this limit and error.

By default, Workers on paid plans are now limited to 10,000 subrequests per invocation, but this limit can be increased up to 10 million by setting the new subrequests limit in your Wrangler configuration file.

{
	"limits": {
		"subrequests": 50000,
	},
}
[limits]
subrequests = 50_000

Workers on the free plan remain limited to 50 external subrequests and 1000 subrequests to Cloudflare services per invocation.

To protect against runaway code or unexpected costs, you can also set a lower limit for both subrequests and CPU usage.

{
	"limits": {
		"subrequests": 10,
		"cpu_ms": 1000,
	},
}
[limits]
subrequests = 10
cpu_ms = 1_000

For more information, refer to the Wrangler configuration documentation for limits and subrequest limits.

Improved React Server Components support in the Cloudflare Vite plugin

The Cloudflare Vite plugin now integrates seamlessly @vitejs/plugin-rsc, the official Vite plugin for React Server Components.

A childEnvironments option has been added to the plugin config to enable using multiple environments within a single Worker. The parent environment can then import modules from a child environment in order to access a separate module graph. For a typical RSC use case, the plugin might be configured as in the following example:

vite.config.tsts
export default defineConfig({
	plugins: [
		cloudflare({
			viteEnvironment: {
				name: "rsc",
				childEnvironments: ["ssr"],
			},
		}),
	],
});

@vitejs/plugin-rsc provides the lower level functionality that frameworks, such as React Router, build upon. The GitHub repository includes a basic Cloudflare example.