---
title: Developer platform Changelog
image: https://edgetunnel-b2h.pages.dev/cf-twitter-card.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://edgetunnel-b2h.pages.dev/changelog/rss/index.xml) [ View RSS feeds ](https://edgetunnel-b2h.pages.dev/fundamentals/new-features/available-rss-feeds/) 

Developer platform

![hero image](https://edgetunnel-b2h.pages.dev/_astro/hero.CVYJHPAd_26AMqX.svg) 

Mar 27, 2026
1. ### [New RFC 9440 mTLS certificate fields in Workers](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-27-rfc9440-mtls-fields/)  
[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
Four new fields are now available on `request.cf.tlsClientAuth` in Workers for requests that include a mutual TLS (mTLS) client certificate. These fields encode the client certificate and its intermediate chain in [RFC 9440 ↗](https://www.rfc-editor.org/rfc/rfc9440) format — the same standard format used by the `Client-Cert` and `Client-Cert-Chain` HTTP headers — so your Worker can forward them directly to your origin without any custom parsing or encoding logic.  
#### New fields

| Field                    | Type    | Description                                                                                                                                          |
| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| certRFC9440              | String  | The client leaf certificate in RFC 9440 format (:base64-DER:). Empty if no client certificate was presented.                                         |
| certRFC9440TooLarge      | Boolean | true if the leaf certificate exceeded 10 KB and was omitted from certRFC9440.                                                                        |
| certChainRFC9440         | String  | The intermediate certificate chain in RFC 9440 format as a comma-separated list. Empty if no intermediates were sent or if the chain exceeded 16 KB. |
| certChainRFC9440TooLarge | Boolean | true if the intermediate chain exceeded 16 KB and was omitted from certChainRFC9440.                                                                 |  
#### Example: forwarding client certificate headers to your origin

**JavaScript**  
```js  
export default {  
  async fetch(request) {  
    const tls = request.cf.tlsClientAuth;  
    // Only forward if cert was verified and chain is complete  
    if (!tls || !tls.certVerified || tls.certRevoked || tls.certChainRFC9440TooLarge) {  
      return new Response("Unauthorized", { status: 401 });  
    }  
    const headers = new Headers(request.headers);  
    headers.set("Client-Cert", tls.certRFC9440);  
    headers.set("Client-Cert-Chain", tls.certChainRFC9440);  
    return fetch(new Request(request, { headers }));  
  },  
};  
```  
For more information, refer to [Client certificate variables](https://edgetunnel-b2h.pages.dev/ssl/client-certificates/client-certificate-variables/#workers-variables) and [Mutual TLS authentication](https://edgetunnel-b2h.pages.dev/cloudflare-one/access-controls/service-credentials/mutual-tls-authentication/).

Mar 26, 2026
1. ### [Easily connect Containers and Sandboxes to Workers](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-26-outbound-workers/)  
[ Containers ](https://edgetunnel-b2h.pages.dev/containers/)  
[Containers](https://edgetunnel-b2h.pages.dev/containers/) and [Sandboxes](https://edgetunnel-b2h.pages.dev/sandbox/) now support connecting directly to Workers over HTTP. This allows you to call Workers functions and [bindings](https://edgetunnel-b2h.pages.dev/workers/runtime-apis/bindings/), like [KV](https://edgetunnel-b2h.pages.dev/kv) or [R2](https://edgetunnel-b2h.pages.dev/r2/), from within the container at specific hostnames.  
#### Run Worker code  
Define an `outbound` handler to capture any HTTP request or use `outboundByHost` to capture requests to individual hostnames and IPs.

**JavaScript**  
```js  
export class MyApp extends Sandbox {}  
MyApp.outbound = async (request, env, ctx) => {  
  // you can run arbitrary functions defined in your Worker on any HTTP request  
  return await someWorkersFunction(request.body);  
};  
MyApp.outboundByHost = {  
  "my.worker": async (request, env, ctx) => {  
    return await anotherFunction(request.body);  
  },  
};  
```  
In this example, requests from the container to `http://my.worker` will run the function defined within `outboundByHost`, and any other HTTP requests will run the `outbound` handler. These handlers run entirely inside the Workers runtime, outside of the container sandbox.  
#### Access Workers bindings  
Each handler has access to `env`, so it can call any binding set in [Wrangler config](https://edgetunnel-b2h.pages.dev/workers/wrangler/configuration/#bindings). Code inside the container makes a standard HTTP request to that hostname and the outbound Worker translates it into a binding call.

**JavaScript**  
```js  
export class MyApp extends Sandbox {}  
MyApp.outboundByHost = {  
  "my.kv": async (request, env, ctx) => {  
    const key = new URL(request.url).pathname.slice(1);  
    const value = await env.KV.get(key);  
    return new Response(value ?? "", { status: value ? 200 : 404 });  
  },  
  "my.r2": async (request, env, ctx) => {  
    const key = new URL(request.url).pathname.slice(1);  
    const object = await env.BUCKET.get(key);  
    return new Response(object?.body ?? "", { status: object ? 200 : 404 });  
  },  
};  
```  
Now, from inside the container sandbox, `curl http://my.kv/some-key` will access [Workers KV](https://edgetunnel-b2h.pages.dev/kv) and `curl http://my.r2/some-object` will access [R2](https://edgetunnel-b2h.pages.dev/r2/).  
#### Access Durable Object state  
Use `ctx.containerId` to reference the container's automatically provisioned [Durable Object](https://edgetunnel-b2h.pages.dev/durable-objects).

**JavaScript**  
```js  
export class MyContainer extends Container {}  
MyContainer.outboundByHost = {  
  "get-state.do": async (request, env, ctx) => {  
    const id = env.MY_CONTAINER.idFromString(ctx.containerId);  
    const stub = env.MY_CONTAINER.get(id);  
    return stub.getStateForKey(request.body);  
  },  
};  
```  
This provides an easy way to associate state with any container instance, and includes a [built-in SQLite database](https://edgetunnel-b2h.pages.dev/durable-objects/get-started/#2-write-a-durable-object-class-using-sql-api).  
#### Get Started Today  
Upgrade to `@cloudflare/containers` version 0.2.0 or later, or `@cloudflare/sandbox` version 0.8.0 or later to use outbound Workers.  
Refer to [Containers outbound traffic](https://edgetunnel-b2h.pages.dev/containers/platform-details/outbound-traffic/) and [Sandboxes outbound traffic](https://edgetunnel-b2h.pages.dev/sandbox/guides/outbound-traffic/) for more details and examples.

Mar 26, 2026
1. ### [Access Durable Object jurisdiction via \`ctx.id.jurisdiction\`](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-26-durable-object-id-jurisdiction/)  
[ Durable Objects ](https://edgetunnel-b2h.pages.dev/durable-objects/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
`ctx.id.jurisdiction` inside a Durable Object now reports the [jurisdiction](https://edgetunnel-b2h.pages.dev/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction) the object was created in — for example `"eu"` when accessed through `env.MY_DURABLE_OBJECT.jurisdiction("eu")` — so you can make region-aware decisions without passing the jurisdiction through method arguments or persisting it in storage. For the full list of ID-construction paths that preserve `jurisdiction`, refer to the [Durable Object ID documentation](https://edgetunnel-b2h.pages.dev/durable-objects/api/id/#jurisdiction).

**JavaScript**  
```js  
export class RegionalRoom extends DurableObject {  
  async fetch(request) {  
    // "eu" when accessed through env.MY_DURABLE_OBJECT.jurisdiction("eu")  
    const region = this.ctx.id.jurisdiction;  
    return new Response(`Hello from ${region ?? "the default region"}!`);  
  }  
}  
// Worker  
export default {  
  async fetch(request, env) {  
    const stub = env.MY_DURABLE_OBJECT.jurisdiction("eu").getByName("general");  
    return stub.fetch(request);  
  },  
};  
```  
`ctx.id.jurisdiction` is `undefined` for Durable Objects that were not created in a jurisdiction-restricted namespace. Alarms scheduled before 2026-03-15 also do not have `jurisdiction` stored; to backfill the value, reschedule the alarm from a `fetch()` or RPC handler.

Mar 25, 2026
1. ### [Declare required secrets in your Wrangler configuration](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-24-secrets-config-property/)  
[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
The new `secrets` configuration property lets you declare the secret names your Worker requires in your Wrangler configuration file. Required secrets are validated during local development and deploy, and used as the source of truth for type generation.

  * [  wrangler.jsonc ](#tab-panel-3445)
  * [  wrangler.toml ](#tab-panel-3446)

**JSONC**  
```jsonc  
{  
  "secrets": {  
    "required": ["API_KEY", "DB_PASSWORD"],  
  },  
}  
```

**TOML**  
```toml  
[secrets]  
required = [ "API_KEY", "DB_PASSWORD" ]  
```  
#### Local development  
When `secrets` is defined, `wrangler dev` and `vite dev` load only the keys listed in `secrets.required` from `.dev.vars` or `.env`/`process.env`. Additional keys in those files are excluded. If any required secrets are missing, a warning is logged listing the missing names.  
#### Type generation  
`wrangler types` generates typed bindings from `secrets.required` instead of inferring names from `.dev.vars` or `.env`. This lets you run type generation in CI or other environments where those files are not present. Per-environment secrets are supported — the aggregated `Env` type marks secrets that only appear in some environments as optional.  
#### Deploy  
`wrangler deploy` and `wrangler versions upload` validate that all secrets in `secrets.required` are configured on the Worker before the operation succeeds. If any required secrets are missing, the command fails with an error listing which secrets need to be set.  
For more information, refer to the [secrets configuration property](https://edgetunnel-b2h.pages.dev/workers/wrangler/configuration/#secrets-configuration-property) reference.

Mar 24, 2026
1. ### [Use Docker Hub images with Containers](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-24-docker-hub-images/)  
[ Containers ](https://edgetunnel-b2h.pages.dev/containers/)  
Containers now support [Docker Hub ↗](https://hub.docker.com/) images. You can use a fully qualified Docker Hub image reference in your [Wrangler configuration ↗](https://edgetunnel-b2h.pages.dev/workers/wrangler/configuration/#containers) instead of first pushing the image to Cloudflare Registry.

  * [  wrangler.jsonc ](#tab-panel-3447)
  * [  wrangler.toml ](#tab-panel-3448)

**JSONC**  
```jsonc  
{  
  "containers": [  
    {  
      // Example: docker.io/cloudflare/sandbox:0.7.18  
      "image": "docker.io/<NAMESPACE>/<REPOSITORY>:<TAG>",  
    },  
  ],  
}  
```

**TOML**  
```toml  
[[containers]]  
image = "docker.io/<NAMESPACE>/<REPOSITORY>:<TAG>"  
```  
Containers also support private Docker Hub images. To configure credentials, refer to [Use private Docker Hub images](https://edgetunnel-b2h.pages.dev/containers/platform-details/image-management/#use-private-docker-hub-images).  
For more information, refer to [Image management](https://edgetunnel-b2h.pages.dev/containers/platform-details/image-management/).

Mar 24, 2026
1. ### [Dynamic Workers, now in open beta](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-24-dynamic-workers-open-beta/)  
[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
[Dynamic Workers](https://edgetunnel-b2h.pages.dev/dynamic-workers/) are now in [open beta ↗](https://blog.cloudflare.com/dynamic-workers/) for all paid Workers users. You can now have a Worker spin up other Workers, called Dynamic Workers, at runtime to execute code on-demand in a secure, sandboxed environment. Dynamic Workers start in milliseconds, making them well suited for fast, secure code execution at scale.  
#### Use Dynamic Workers for

  * **[Code Mode](https://edgetunnel-b2h.pages.dev/agents/tools/codemode/)**: LLMs are trained to write code. Run tool-calling logic written in code instead of stepping through many tool calls, which can save up to 80% in inference tokens and cost.
  * **AI agents executing code**: Run code for tasks like data analysis, file transformation, API calls, and chained actions.
  * **Running AI-generated code**: Run generated code for prototypes, projects, and automations in a secure, isolated sandboxed environment.
  * **Fast development and previews**: Load prototypes, previews, and playgrounds in milliseconds.
  * **Custom automations**: Create custom tools on the fly that execute a task, call an integration, or automate a workflow.  
#### Executing Dynamic Workers  
Dynamic Workers support two loading modes:

  * `load(code)` — for one-time code execution (equivalent to calling `get()` with a null ID).
  * `get(id, callback)` — caches a Dynamic Worker by ID so it can stay warm across requests. Use this when the same code will receive subsequent requests.

  * [  JavaScript ](#tab-panel-3463)
  * [  TypeScript ](#tab-panel-3464)

**JavaScript**  
```js  
export default {  
  async fetch(request, env) {  
    const worker = env.LOADER.load({  
      compatibilityDate: "2026-01-01",  
      mainModule: "src/index.js",  
      modules: {  
        "src/index.js": `  
          export default {  
            fetch() {  
              return new Response("Hello from a dynamic Worker");  
            },  
          };  
        `,  
      },  
      // Block all outbound network access from the Dynamic Worker.  
      globalOutbound: null,  
    });  
    return worker.getEntrypoint().fetch(request);  
  },  
};  
```

**TypeScript**  
```ts  
export default {  
  async fetch(request: Request, env: Env): Promise<Response> {  
    const worker = env.LOADER.load({  
      compatibilityDate: "2026-01-01",  
      mainModule: "src/index.js",  
      modules: {  
        "src/index.js": `  
          export default {  
            fetch() {  
              return new Response("Hello from a dynamic Worker");  
            },  
          };  
        `,  
      },  
      // Block all outbound network access from the Dynamic Worker.  
      globalOutbound: null,  
    });  
    return worker.getEntrypoint().fetch(request);  
  },  
};  
```  
#### Helper libraries for Dynamic Workers  
Here are 3 new libraries to help you build with Dynamic Workers:

  * **[@cloudflare/codemode ↗](https://www.npmjs.com/package/@cloudflare/codemode)**: Replace individual tool calls with a single `code()` tool, so LLMs write and execute TypeScript that orchestrates multiple API calls in one pass.
  * **[@cloudflare/worker-bundler ↗](https://www.npmjs.com/package/@cloudflare/worker-bundler)**: Resolve npm dependencies and bundle source files into ready-to-load modules for Dynamic Workers, all at runtime.
  * **[@cloudflare/shell ↗](https://www.npmjs.com/package/@cloudflare/shell)**: Give your agent a virtual filesystem inside a Dynamic Worker with persistent storage backed by SQLite and R2.  
#### Try it out

**Dynamic Workers Starter**  
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers)  
Use this [starter ↗](https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers) to deploy a Worker that can load and execute Dynamic Workers.

**Dynamic Workers Playground**  
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-playground)  
Deploy the [Dynamic Workers Playground ↗](https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-playground) to write or import code, bundle it at runtime with `@cloudflare/worker-bundler`, execute it through a Dynamic Worker, and see real-time responses and execution logs.  
For the full API reference and configuration options, refer to the [Dynamic Workers documentation](https://edgetunnel-b2h.pages.dev/dynamic-workers/).  
#### Pricing  
Dynamic Workers [pricing](https://edgetunnel-b2h.pages.dev/dynamic-workers/pricing/) is based on three dimensions: Dynamic Workers created daily, requests, and CPU time.

|                                   | Included                               | Additional usage                    |
| --------------------------------- | -------------------------------------- | ----------------------------------- |
| **Dynamic Workers created daily** | 1,000 unique Dynamic Workers per month | +$0.002 per Dynamic Worker per day  |
| **Requests** ¹                    | 10 million per month                   | +$0.30 per million requests         |
| **CPU time** ¹                    | 30 million CPU milliseconds per month  | +$0.02 per million CPU milliseconds |  
¹ Uses [Workers Standard rates](https://edgetunnel-b2h.pages.dev/workers/platform/pricing/#workers) and will appear as part of your existing Workers bill, not as separate Dynamic Workers charges.  
Note: Dynamic Workers requests and CPU time are already billed as part of your Workers plan and will count toward your Workers requests and CPU usage. The Dynamic Workers created daily charge is not yet active — you will not be billed for the number of Dynamic Workers created at this time. Pricing information is shared in advance so you can estimate future costs.

Mar 23, 2026
1. ### [Workflow instances now support pause(), resume(), restart(), and terminate() methods in local development](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-local-dev-instance-methods/)  
[ Workflows ](https://edgetunnel-b2h.pages.dev/workflows/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` are now available in local development when using `wrangler dev`.  
You can now test the full Workflow instance lifecycle locally:

**TypeScript**  
```ts  
const instance = await env.MY_WORKFLOW.create({  
  id: "my-instance-id",  
});  
await instance.pause(); // pauses a running workflow instance  
await instance.resume(); // resumes a paused instance  
await instance.restart(); // restarts the instance from the beginning  
await instance.terminate(); // terminates the instance immediately  
```

Mar 23, 2026
1. ### [Agents SDK v0.8.0: readable state, idempotent schedules, typed AgentClient, and Zod 4](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-agents-sdk-v080/)  
[ Agents ](https://edgetunnel-b2h.pages.dev/agents/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
The latest release of the [Agents SDK ↗](https://github.com/cloudflare/agents) exposes agent state as a readable property, prevents duplicate schedule rows across Durable Object restarts, brings full TypeScript inference to `AgentClient`, and migrates to Zod 4.  
#### Readable `state` on `useAgent` and `AgentClient`  
Both `useAgent` (React) and `AgentClient` (vanilla JS) now expose a `state` property that reflects the current agent state. Previously, reading state required manually tracking it through the `onStateUpdate` callback.

**React (`useAgent`)**

  * [  JavaScript ](#tab-panel-3451)
  * [  TypeScript ](#tab-panel-3452)

**JavaScript**  
```js  
const agent = useAgent({  
  agent: "game-agent",  
  name: "room-123",  
});  
// Read state directly — no separate useState + onStateUpdate needed  
return <div>Score: {agent.state?.score}</div>;  
// Spread for partial updates  
agent.setState({ ...agent.state, score: (agent.state?.score ?? 0) + 10 });  
```

**TypeScript**  
```ts  
const agent = useAgent<GameAgent, GameState>({  
  agent: "game-agent",  
  name: "room-123",  
});  
// Read state directly — no separate useState + onStateUpdate needed  
return <div>Score: {agent.state?.score}</div>;  
// Spread for partial updates  
agent.setState({ ...agent.state, score: (agent.state?.score ?? 0) + 10 });  
```  
`agent.state` is reactive — the component re-renders when state changes from either the server or a client-side `setState()` call.

**Vanilla JS (`AgentClient`)**

  * [  JavaScript ](#tab-panel-3453)
  * [  TypeScript ](#tab-panel-3454)

**JavaScript**  
```js  
const client = new AgentClient({  
  agent: "game-agent",  
  name: "room-123",  
  host: "your-worker.workers.dev",  
});  
client.setState({ score: 100 });  
console.log(client.state); // { score: 100 }  
```

**TypeScript**  
```ts  
const client = new AgentClient<GameAgent>({  
  agent: "game-agent",  
  name: "room-123",  
  host: "your-worker.workers.dev",  
});  
client.setState({ score: 100 });  
console.log(client.state); // { score: 100 }  
```  
State starts as `undefined` and is populated when the server sends the initial state on connect (from `initialState`) or when `setState()` is called. Use optional chaining (`agent.state?.field`) for safe access. The `onStateUpdate` callback continues to work as before — the new `state` property is additive.  
#### Idempotent `schedule()`  
`schedule()` now supports an `idempotent` option that deduplicates by `(type, callback, payload)`, preventing duplicate rows from accumulating when called in places that run on every Durable Object restart such as `onStart()`.

**Cron schedules are idempotent by default.** Calling `schedule("0 * * * *", "tick")` multiple times with the same callback, expression, and payload returns the existing schedule row instead of creating a new one. Pass `{ idempotent: false }` to override.  
Delayed and date-scheduled types support opt-in idempotency:

  * [  JavaScript ](#tab-panel-3457)
  * [  TypeScript ](#tab-panel-3458)

**JavaScript**  
```js  
import { Agent } from "agents";  
class MyAgent extends Agent {  
  async onStart() {  
    // Safe across restarts — only one row is created  
    await this.schedule(60, "maintenance", undefined, { idempotent: true });  
  }  
}  
```

**TypeScript**  
```ts  
import { Agent } from "agents";  
class MyAgent extends Agent {  
  async onStart() {  
    // Safe across restarts — only one row is created  
    await this.schedule(60, "maintenance", undefined, { idempotent: true });  
  }  
}  
```  
Two new warnings help catch common foot-guns:

  * Calling `schedule()` inside `onStart()` without `{ idempotent: true }` emits a `console.warn` with actionable guidance (once per callback; skipped for cron and when `idempotent` is set explicitly).
  * If an alarm cycle processes 10 or more stale one-shot rows for the same callback, the SDK emits a `console.warn` and a `schedule:duplicate_warning` diagnostics channel event.  
#### Typed `AgentClient` with `call` inference and `stub` proxy  
`AgentClient` now accepts an optional agent type parameter for full type inference on RPC calls, matching the typed experience already available with `useAgent`.

  * [  JavaScript ](#tab-panel-3461)
  * [  TypeScript ](#tab-panel-3462)

**JavaScript**  
```js  
const client = new AgentClient({  
  agent: "my-agent",  
  host: window.location.host,  
});  
// Typed call — method name autocompletes, args and return type inferred  
const value = await client.call("getValue");  
// Typed stub — direct RPC-style proxy  
await client.stub.getValue();  
await client.stub.add(1, 2);  
```

**TypeScript**  
```ts  
const client = new AgentClient<MyAgent>({  
  agent: "my-agent",  
  host: window.location.host,  
});  
// Typed call — method name autocompletes, args and return type inferred  
const value = await client.call("getValue");  
// Typed stub — direct RPC-style proxy  
await client.stub.getValue();  
await client.stub.add(1, 2);  
```  
State is automatically inferred from the agent type, so `onStateUpdate` is also typed:

  * [  JavaScript ](#tab-panel-3459)
  * [  TypeScript ](#tab-panel-3460)

**JavaScript**  
```js  
const client = new AgentClient({  
  agent: "my-agent",  
  host: window.location.host,  
  onStateUpdate: (state) => {  
    // state is typed as MyAgent's state type  
  },  
});  
```

**TypeScript**  
```ts  
const client = new AgentClient<MyAgent>({  
  agent: "my-agent",  
  host: window.location.host,  
  onStateUpdate: (state) => {  
    // state is typed as MyAgent's state type  
  },  
});  
```  
Existing untyped usage continues to work without changes. The RPC type utilities (`AgentMethods`, `AgentStub`, `RPCMethods`) are now exported from `agents/client` for advanced typing scenarios. `agents`, `@cloudflare/ai-chat`, and `@cloudflare/codemode` now require `zod ^4.0.0`. Zod v3 is no longer supported.  
#### `@cloudflare/ai-chat` fixes

  * **Turn serialization** — `onChatMessage()` and `_reply()` work is now queued so user requests, tool continuations, and `saveMessages()` never stream concurrently.
  * **Duplicate messages on stop** — Clicking stop during an active stream no longer splits the assistant message into two entries.
  * **Duplicate messages after tool calls** — Orphaned client IDs no longer leak into persistent storage.  
#### `keepAlive()` and `keepAliveWhile()` are no longer experimental  
`keepAlive()` now uses a lightweight in-memory ref count instead of schedule rows. Multiple concurrent callers share a single alarm cycle. The `@experimental` tag has been removed from both `keepAlive()` and `keepAliveWhile()`.  
#### `@cloudflare/codemode`: TanStack AI integration  
A new entry point `@cloudflare/codemode/tanstack-ai` adds support for [TanStack AI's ↗](https://tanstack.com/ai) `chat()` as an alternative to the Vercel AI SDK's `streamText()`:

  * [  JavaScript ](#tab-panel-3467)
  * [  TypeScript ](#tab-panel-3468)

**JavaScript**  
```js  
import {  
  createCodeTool,  
  tanstackTools,  
} from "@cloudflare/codemode/tanstack-ai";  
import { chat } from "@tanstack/ai";  
const codeTool = createCodeTool({  
  tools: [tanstackTools(myServerTools)],  
  executor,  
});  
const stream = chat({ adapter, tools: [codeTool], messages });  
```

**TypeScript**  
```ts  
import { createCodeTool, tanstackTools } from "@cloudflare/codemode/tanstack-ai";  
import { chat } from "@tanstack/ai";  
const codeTool = createCodeTool({  
  tools: [tanstackTools(myServerTools)],  
  executor,  
});  
const stream = chat({ adapter, tools: [codeTool], messages });  
```  
#### Upgrade  
To update to the latest version:  
```sh  
npm i agents@latest @cloudflare/ai-chat@latest  
```

Mar 23, 2026
1. ### [New AI Search REST API endpoints for /search and /chat/completions](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-ai-search-new-rest-api/)  
[ AI Search ](https://edgetunnel-b2h.pages.dev/ai-search/)  
[AI Search](https://edgetunnel-b2h.pages.dev/ai-search/) now offers new [REST API](https://edgetunnel-b2h.pages.dev/ai-search/api/search/rest-api/) endpoints for search and chat that use an OpenAI compatible format. This means you can use the familiar `messages` array structure that works with existing OpenAI SDKs and tools. The messages array also lets you pass previous messages within a session, so the model can maintain context across multiple turns.

| Endpoint         | Path                                                                     |
| ---------------- | ------------------------------------------------------------------------ |
| Chat Completions | POST /accounts/{account\_id}/ai-search/instances/{name}/chat/completions |
| Search           | POST /accounts/{account\_id}/ai-search/instances/{name}/search           |  
Here is an example request to the Chat Completions endpoint using the new `messages` array format:  
```bash  
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances/{NAME}/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -d '{  
    "messages": [  
      {  
        "role": "system",  
        "content": "You are a helpful documentation assistant."  
      },  
      {  
        "role": "user",  
        "content": "How do I get started?"  
      }  
    ]  
  }'  
```  
For more details, refer to the [AI Search REST API guide](https://edgetunnel-b2h.pages.dev/ai-search/api/search/rest-api/).  
#### Migration from existing AutoRAG API (recommended)  
If you are using the previous AutoRAG API endpoints (`/autorag/rags/`), we recommend migrating to the new endpoints. The previous AutoRAG API endpoints will continue to be fully supported.  
Refer to the [migration guide](https://edgetunnel-b2h.pages.dev/ai-search/api/migration/rest-api/) for step-by-step instructions.

Mar 23, 2026
1. ### [AI Search UI snippets and MCP support](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-ai-search-public-endpoint-and-snippets/)  
[ AI Search ](https://edgetunnel-b2h.pages.dev/ai-search/)  
[AI Search](https://edgetunnel-b2h.pages.dev/ai-search/) now supports public endpoints, UI snippets, and MCP, making it easy to add search to your website or connect AI agents.  
Public endpoints allow you to expose AI Search capabilities without requiring API authentication. To enable public endpoints:

  1. Go to **AI Search** in the Cloudflare dashboard. [ Go to **AI Search** ](https://dash.cloudflare.com/?to=/:account/ai/ai-search)
  2. Select your instance, and turn on **Public Endpoint** in **Settings**. For more details, refer to [Public endpoint configuration](https://edgetunnel-b2h.pages.dev/ai-search/configuration/retrieval/public-endpoint/).  
#### UI snippets  
UI snippets are pre-built search and chat components you can embed in your website. Visit [search.ai.cloudflare.com ↗](https://search.ai.cloudflare.com/) to configure and preview components for your AI Search instance.  
![Example of the search-modal-snippet component](https://edgetunnel-b2h.pages.dev/_astro/ui-snippet-search-modal.nSXbvcsi_1H402.webp)  
To add a search modal to your page:  
```html  
<script  
  type="module"  
  src="https://<INSTANCE_ID>.search.ai.cloudflare.com/assets/v0.0.25/search-snippet.es.js"  
></script>  
<search-modal-snippet  
  api-url="https://<INSTANCE_ID>.search.ai.cloudflare.com/"  
  placeholder="Search..."  
>  
</search-modal-snippet>  
```  
For more details, refer to the [UI snippets documentation](https://edgetunnel-b2h.pages.dev/ai-search/configuration/retrieval/embed-search-snippets/).  
#### MCP  
The MCP endpoint allows AI agents to search your content via the Model Context Protocol. Connect your MCP client to:  
```txt  
https://<INSTANCE_ID>.search.ai.cloudflare.com/mcp  
```  
For more details, refer to the [MCP documentation](https://edgetunnel-b2h.pages.dev/ai-search/api/search/mcp/).

Mar 23, 2026
1. ### [Custom metadata filtering for AI Search](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-custom-metadata-filtering/)  
[ AI Search ](https://edgetunnel-b2h.pages.dev/ai-search/)  
[AI Search](https://edgetunnel-b2h.pages.dev/ai-search/) now supports custom metadata filtering, allowing you to define your own metadata fields and filter search results based on attributes like category, version, or any custom field you define.  
#### Define a custom metadata schema  
You can define up to 5 custom metadata fields per AI Search instance. Each field has a name and data type (`text`, `number`, or `boolean`):  
```bash  
curl -X POST https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -d '{  
    "id": "my-instance",  
    "type": "r2",  
    "source": "my-bucket",  
    "custom_metadata": [  
      { "field_name": "category", "data_type": "text" },  
      { "field_name": "version", "data_type": "number" },  
      { "field_name": "is_public", "data_type": "boolean" }  
    ]  
  }'  
```  
#### Add metadata to your documents  
How you attach metadata depends on your data source:

  * **R2 bucket**: Set metadata using S3-compatible custom headers (`x-amz-meta-*`) when uploading objects. Refer to [R2 custom metadata](https://edgetunnel-b2h.pages.dev/ai-search/configuration/data-source/r2/#custom-metadata) for examples.
  * **Website**: Add `<meta>` tags to your HTML pages. Refer to [Website custom metadata](https://edgetunnel-b2h.pages.dev/ai-search/configuration/data-source/website/#custom-metadata) for details.  
#### Filter search results  
Use custom metadata fields in your search queries alongside built-in attributes like `folder` and `timestamp`:  
```bash  
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances/{NAME}/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -d '{  
    "messages": [  
      {  
        "content": "How do I configure authentication?",  
        "role": "user"  
      }  
    ],  
    "ai_search_options": {  
      "retrieval": {  
        "filters": {  
          "category": "documentation",  
          "version": { "$gte": 2.0 }  
        }  
      }  
    }  
  }'  
```  
Learn more in the [metadata filtering documentation](https://edgetunnel-b2h.pages.dev/ai-search/configuration/indexing/metadata/).

Mar 23, 2026
1. ### [R2 SQL now supports over 190 new functions, expressions, and complex types](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-23-expanded-sql-functions-expressions-complex-types/)  
[ R2 SQL ](https://edgetunnel-b2h.pages.dev/r2-sql/)  
[R2 SQL](https://edgetunnel-b2h.pages.dev/r2-sql/) now supports an expanded SQL grammar so you can write richer analytical queries without exporting data. This release adds CASE expressions, column aliases, arithmetic in clauses, 163 scalar functions, 33 aggregate functions, EXPLAIN, Common Table Expressions (CTEs),and full struct/array/map access. R2 SQL is Cloudflare's serverless, distributed, analytics query engine for querying [Apache Iceberg ↗](https://iceberg.apache.org/) tables stored in [R2 Data Catalog](https://edgetunnel-b2h.pages.dev/r2/data-catalog/). This page documents the supported SQL syntax.  
#### Highlights

  * **Column aliases** — `SELECT col AS alias` now works in all clauses
  * **CASE expressions** — conditional logic directly in SQL (searched and simple forms)
  * **Scalar functions** — 163 new functions across math, string, datetime, regex, crypto, encoding, and type inspection categories
  * **Aggregate functions** — statistical (variance, stddev, correlation, regression), bitwise, boolean, and positional aggregates join the existing basic and approximate functions
  * **Complex types** — query struct fields with bracket notation, use 46 array functions, and extract map keys/values
  * **Common table expressions (CTEs)** — use `WITH ... AS` to define named temporary result sets. Chained CTEs are supported. All CTEs must reference the same single table.
  * **Full expression support** — arithmetic, type casting (`CAST`, `TRY_CAST`, `::` shorthand), and `EXTRACT` in SELECT, WHERE, GROUP BY, HAVING, and ORDER BY  
#### Examples  
#### CASE expressions with statistical aggregates  
```sql  
SELECT source,  
    CASE  
        WHEN AVG(price) > 30 THEN 'premium'  
        WHEN AVG(price) > 10 THEN 'mid-tier'  
        ELSE 'budget'  
    END AS tier,  
    round(stddev(price), 2) AS price_volatility,  
    approx_percentile_cont(price, 0.95) AS p95_price  
FROM my_namespace.sales_data  
GROUP BY source  
```  
#### Struct and array access  
```sql  
SELECT product_name,  
    pricing['price'] AS price,  
    array_to_string(tags, ', ') AS tag_list  
FROM my_namespace.products  
WHERE array_has(tags, 'Action')  
ORDER BY pricing['price'] DESC  
LIMIT 10  
```  
#### Chained CTEs with time-series analysis  
```sql  
WITH monthly AS (  
    SELECT date_trunc('month', sale_timestamp) AS month,  
        department,  
        COUNT(*) AS transactions,  
        round(AVG(total_amount), 2) AS avg_amount  
    FROM my_namespace.sales_data  
    WHERE sale_timestamp BETWEEN '2025-01-01T00:00:00Z' AND '2025-12-31T23:59:59Z'  
    GROUP BY date_trunc('month', sale_timestamp), department  
),  
ranked AS (  
    SELECT month, department, transactions, avg_amount,  
        CASE  
            WHEN avg_amount > 1000 THEN 'high-value'  
            WHEN avg_amount > 500 THEN 'mid-value'  
            ELSE 'standard'  
        END AS tier  
    FROM monthly  
    WHERE transactions > 100  
)  
SELECT * FROM ranked  
ORDER BY month, avg_amount DESC  
```  
For the full function reference and syntax details, refer to the [SQL reference](https://edgetunnel-b2h.pages.dev/r2-sql/sql-reference/). For limitations and best practices, refer to [Limitations and best practices](https://edgetunnel-b2h.pages.dev/r2-sql/reference/limitations-best-practices/).

Mar 20, 2026
1. ### [Stream logs from multiple replicas of Cloudflare Tunnel simultaneously](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-20-tunnel-replica-overview-and-multi-log-streaming/)  
[ Cloudflare Tunnel ](https://edgetunnel-b2h.pages.dev/tunnel/)[ Cloudflare Tunnel for SASE ](https://edgetunnel-b2h.pages.dev/cloudflare-one/networks/connectors/cloudflare-tunnel/)  
In the Cloudflare One dashboard, the overview page for a specific Cloudflare Tunnel now shows all [replicas](https://edgetunnel-b2h.pages.dev/cloudflare-one/networks/connectors/cloudflare-tunnel/configure-tunnels/tunnel-availability/) of that tunnel and supports streaming logs from multiple replicas at once.  
![View replicas and stream logs from multiple connectors](https://edgetunnel-b2h.pages.dev/_astro/tunnel-multiconn.DEOEaLlu_ZDxArh.webp)  
Previously, you could only stream logs from one replica at a time. With this update:

  * **Replicas on the tunnel overview** — All active replicas for the selected tunnel now appear on that tunnel's overview page under **Connectors**. Select any replica to stream its logs.
  * **Multi-connector log streaming** — Stream logs from multiple replicas simultaneously, making it easier to correlate events across your infrastructure during debugging or incident response. To try it out, log in to [Cloudflare One ↗](https://one.dash.cloudflare.com/) and go to **Networks** \> **Connectors** \> **Cloudflare Tunnels**. Select **View logs** next to the tunnel you want to monitor.  
For more information, refer to [Tunnel log streams](https://edgetunnel-b2h.pages.dev/cloudflare-one/networks/connectors/cloudflare-tunnel/monitor-tunnels/logs/) and [Deploy replicas](https://edgetunnel-b2h.pages.dev/cloudflare-one/networks/connectors/cloudflare-tunnel/configure-tunnels/tunnel-availability/deploy-replicas/).

Mar 20, 2026
1. ### [Observability for Workers VPC Services](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-20-metrics-and-settings-dashboard/)  
[ Workers VPC ](https://edgetunnel-b2h.pages.dev/workers-vpc/)  
Each VPC Service now has a **Metrics** tab so you can monitor connection health and debug failures without leaving the dashboard.  
![Workers VPC Metrics dashboard showing connections, latency, and errors charts](https://edgetunnel-b2h.pages.dev/_astro/2026-03-20-metrics-dashboard.6kfnbqQd_1Oc7Ft.webp)  
  * **Connections** — See successful and failed connections over time, broken down by what is responsible: your origin (Bad Upstream), your configuration (Client), or Cloudflare (Internal).
  * **Latency** — Track connection and DNS resolution latency trends.
  * **Errors** — Drill into specific error codes grouped by category, with filters to isolate upstream, client, or internal failures.  
You can also view and edit your VPC Service configuration, host details, and port assignments from the **Settings** tab.  
For a full list of error codes and what they mean, refer to [Troubleshooting](https://edgetunnel-b2h.pages.dev/workers-vpc/reference/troubleshooting/).

Mar 19, 2026
1. ### [Hyperdrive now supports custom TLS/SSL certificates for MySQL](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-19-hyperdrive-mysql-custom-certificate-support/)  
[ Hyperdrive ](https://edgetunnel-b2h.pages.dev/hyperdrive/)  
Hyperdrive now supports custom TLS/SSL certificates for MySQL databases, bringing the same certificate options previously available for PostgreSQL to MySQL connections.  
You can now configure:

  * **Server certificate verification** with `VERIFY_CA` or `VERIFY_IDENTITY` SSL modes to verify that your MySQL database server's certificate is signed by the expected certificate authority (CA).
  * **Client certificates** (mTLS) for Hyperdrive to authenticate itself to your MySQL database with credentials beyond username and password.  
Create a Hyperdrive configuration with custom certificates for MySQL:  
```bash  
# Upload a CA certificate  
npx wrangler cert upload certificate-authority --ca-cert your-ca-cert.pem --name your-custom-ca-name  
# Create a Hyperdrive with VERIFY_IDENTITY mode  
npx wrangler hyperdrive create your-hyperdrive-config \
  --connection-string="mysql://user:password@hostname:port/database" \
  --ca-certificate-id <CA_CERT_ID> \
  --sslmode VERIFY_IDENTITY  
```  
For more information, refer to [SSL/TLS certificates for Hyperdrive](https://edgetunnel-b2h.pages.dev/hyperdrive/configuration/tls-ssl-certificates-for-hyperdrive/) and [MySQL TLS/SSL modes](https://edgetunnel-b2h.pages.dev/hyperdrive/examples/connect-to-mysql/).

Mar 19, 2026
1. ### [Manage Cloudflare Tunnels with Wrangler](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-19-wrangler-tunnel-commands/)  
[ Cloudflare Tunnel ](https://edgetunnel-b2h.pages.dev/tunnel/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
You can now manage [Cloudflare Tunnels](https://edgetunnel-b2h.pages.dev/tunnel/) directly from [Wrangler](https://edgetunnel-b2h.pages.dev/workers/wrangler/), the CLI for the Cloudflare Developer Platform. The new [wrangler tunnel](https://edgetunnel-b2h.pages.dev/workers/wrangler/commands/tunnel/) commands let you create, run, and manage tunnels without leaving your terminal.  
![Wrangler tunnel commands demo](https://edgetunnel-b2h.pages.dev/_astro/wrangler-tunnel.DOqrtGGg_7EDX0.webp)  
Available commands:

  * `wrangler tunnel create` — Create a new remotely managed tunnel.
  * `wrangler tunnel list` — List all tunnels in your account.
  * `wrangler tunnel info` — Display details about a specific tunnel.
  * `wrangler tunnel delete` — Delete a tunnel.
  * `wrangler tunnel run` — Run a tunnel using the cloudflared daemon.
  * `wrangler tunnel quick-start` — Start a free, temporary tunnel without an account using [Quick Tunnels](https://edgetunnel-b2h.pages.dev/tunnel/setup/#quick-tunnels-development).  
Wrangler handles downloading and managing the [cloudflared](https://edgetunnel-b2h.pages.dev/tunnel/downloads/) binary automatically. On first use, you will be prompted to download `cloudflared` to a local cache directory.  
These commands are currently experimental and may change without notice.  
To get started, refer to the [Wrangler tunnel commands documentation](https://edgetunnel-b2h.pages.dev/workers/wrangler/commands/tunnel/).

Mar 19, 2026
1. ### [Moonshot AI Kimi K2.5 now available on Workers AI](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-19-kimi-k2-5-workers-ai/)  
[ Workers AI ](https://edgetunnel-b2h.pages.dev/workers-ai/)  
Workers AI is officially in the big models game. [@cf/moonshotai/kimi-k2.5](https://edgetunnel-b2h.pages.dev/workers-ai/models/kimi-k2.5/) is the first frontier-scale open-source model on our AI inference platform — a large model with a full 256k context window, multi-turn tool calling, vision inputs, and structured outputs. By bringing a frontier-scale model directly onto the Cloudflare Developer Platform, you can now run the entire agent lifecycle on a single, unified platform.  
The model has proven to be a fast, efficient alternative to larger proprietary models without sacrificing quality. As AI adoption increases, the volume of inference is skyrocketing — now you can access frontier intelligence at a fraction of the cost.  
#### Key capabilities

  * **256,000 token context window** for retaining full conversation history, tool definitions, and entire codebases across long-running agent sessions
  * **Multi-turn tool calling** for building agents that invoke tools across multiple conversation turns
  * **Vision inputs** for processing images alongside text
  * **Structured outputs** with JSON mode and JSON Schema support for reliable downstream parsing
  * **Function calling** for integrating external tools and APIs into agent workflows  
#### Prefix caching and session affinity  
When an agent sends a new prompt, it resends all previous prompts, tools, and context from the session. The delta between consecutive requests is usually just a few new lines of input. Prefix caching avoids reprocessing the shared context, saving time and compute from the prefill stage. This means faster Time to First Token (TTFT) and higher Tokens Per Second (TPS) throughput.  
Workers AI has done prefix caching, but we are now surfacing cached tokens as a usage metric and offering a discount on cached tokens compared to input tokens (pricing is listed on the [model page](https://edgetunnel-b2h.pages.dev/workers-ai/models/kimi-k2.5/)).  
```bash  
curl -X POST \  
  "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/@cf/moonshotai/kimi-k2.5" \
  -H "Authorization: Bearer {api_token}" \
  -H "Content-Type: application/json" \
  -H "x-session-affinity: ses_12345678" \
  -d '{  
    "messages": [  
      {  
        "role": "system",  
        "content": "You are a helpful assistant."  
      },  
      {  
        "role": "user",  
        "content": "What is prefix caching and why does it matter?"  
      }  
    ],  
    "max_tokens": 2400,  
    "stream": true  
  }'  
```  
Some clients like [OpenCode ↗](https://opencode.ai) implement session affinity automatically. The [Agents SDK ↗](https://github.com/cloudflare/agents) starter also sets up the wiring for you.  
#### Redesigned asynchronous API  
For volumes of requests that exceed synchronous rate limits, you can submit batches of inferences to be completed asynchronously. We have revamped the [Asynchronous Batch API](https://edgetunnel-b2h.pages.dev/workers-ai/features/batch-api/) with a pull-based system that processes queued requests as soon as capacity is available. With internal testing, async requests usually execute within 5 minutes, but this depends on live traffic.  
The async API is the best way to avoid capacity errors in durable workflows. It is ideal for use cases that are not real-time, such as code scanning agents or research agents.  
To use the asynchronous API, pass `queueRequest: true`:

**JavaScript**  
```js  
// 1. Push a batch of requests into the queue  
const res = await env.AI.run(  
  "@cf/moonshotai/kimi-k2.5",  
  {  
    requests: [  
      {  
        messages: [{ role: "user", content: "Tell me a joke" }],  
      },  
      {  
        messages: [{ role: "user", content: "Explain the Pythagoras theorem" }],  
      },  
    ],  
  },  
  { queueRequest: true },  
);  
// 2. Grab the request ID  
const requestId = res.request_id;  
// 3. Poll for the result  
const result = await env.AI.run("@cf/moonshotai/kimi-k2.5", {  
  request_id: requestId,  
});  
if (result.status === "queued" || result.status === "running") {  
  // Retry by polling again  
} else {  
  return Response.json(result);  
}  
```  
You can also set up [event notifications](https://edgetunnel-b2h.pages.dev/workers-ai/platform/event-subscriptions/) to know when inference is complete instead of polling.  
#### Get started  
Use Kimi K2.5 through the [Workers AI binding](https://edgetunnel-b2h.pages.dev/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, [AI Gateway](https://edgetunnel-b2h.pages.dev/ai-gateway/), or via the [OpenAI-compatible endpoint](https://edgetunnel-b2h.pages.dev/workers-ai/configuration/open-ai-compatibility/).  
For more information, refer to the [Kimi K2.5 model page](https://edgetunnel-b2h.pages.dev/workers-ai/models/kimi-k2.5/), [pricing](https://edgetunnel-b2h.pages.dev/workers-ai/platform/pricing/), and [prompt caching](https://edgetunnel-b2h.pages.dev/workers-ai/features/prompt-caching/).

Mar 18, 2026
1. ### [Media Transformations binding for Workers](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-18-media-transformations-workers-binding/)  
[ Stream ](https://edgetunnel-b2h.pages.dev/stream/)  
You can now use a Workers binding to transform videos with Media Transformations. This allows you to resize, crop, extract frames, and extract audio from videos stored anywhere, even in private locations like R2 buckets.  
The Media Transformations binding is useful when you want to:

  * Transform videos stored in private or protected sources
  * Optimize videos and store the output directly back to R2 for re-use
  * Extract still frames for classification or description with Workers AI
  * Extract audio tracks for transcription using Workers AI  
To get started, add the Media binding to your Wrangler configuration:

  * [  wrangler.jsonc ](#tab-panel-3449)
  * [  wrangler.toml ](#tab-panel-3450)

**JSONC**  
```jsonc  
{  
  "$schema": "./node_modules/wrangler/config-schema.json",  
  "media": {  
    "binding": "MEDIA"  
  }  
}  
```

**TOML**  
```toml  
[media]  
binding = "MEDIA"  
```  
Then use the binding in your Worker to transform videos:

  * [  JavaScript ](#tab-panel-3471)
  * [  TypeScript ](#tab-panel-3472)

**JavaScript**  
```js  
export default {  
  async fetch(request, env) {  
    const video = await env.R2_BUCKET.get("input.mp4");  
    const result = env.MEDIA.input(video.body)  
      .transform({ width: 480, height: 270 })  
      .output({ mode: "video", duration: "5s" });  
    return await result.response();  
  },  
};  
```

**TypeScript**  
```ts  
export default {  
  async fetch(request, env) {  
    const video = await env.R2_BUCKET.get("input.mp4");  
    const result = env.MEDIA.input(video.body)  
      .transform({ width: 480, height: 270 })  
      .output({ mode: "video", duration: "5s" });  
    return await result.response();  
  },  
};  
```  
Output modes include `video` for optimized MP4 clips, `frame` for still images, `spritesheet` for multiple frames, and `audio` for M4A extraction.  
For more information, refer to the [Media Transformations binding documentation](https://edgetunnel-b2h.pages.dev/stream/transform-videos/bindings/).

Mar 17, 2026
1. ### [@cloudflare/codemode v0.2.1: MCP barrel export, zero-dependency main entry point, and custom sandbox modules](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-17-codemode-sdk-v021/)  
[ Agents ](https://edgetunnel-b2h.pages.dev/agents/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
The latest releases of [@cloudflare/codemode ↗](https://www.npmjs.com/package/@cloudflare/codemode) add a new MCP barrel export, remove `ai` and `zod` as required peer dependencies from the main entry point, and give you more control over the sandbox.  
#### New `@cloudflare/codemode/mcp` export  
A new `@cloudflare/codemode/mcp` entry point provides two functions that wrap MCP servers with Code Mode:

  * **`codeMcpServer({ server, executor })`** — wraps an existing MCP server with a single `code` tool where each upstream tool becomes a typed `codemode.*` method.
  * **`openApiMcpServer({ spec, executor, request })`** — creates `search` and `execute` MCP tools from an OpenAPI spec with host-side request proxying and automatic `$ref` resolution.

  * [  JavaScript ](#tab-panel-3469)
  * [  TypeScript ](#tab-panel-3470)

**JavaScript**  
```js  
import { codeMcpServer } from "@cloudflare/codemode/mcp";  
import { DynamicWorkerExecutor } from "@cloudflare/codemode";  
const executor = new DynamicWorkerExecutor({ loader: env.LOADER });  
// Wrap an existing MCP server — all its tools become  
// typed methods the LLM can call from generated code  
const server = await codeMcpServer({ server: upstreamMcp, executor });  
```

**TypeScript**  
```ts  
import { codeMcpServer } from "@cloudflare/codemode/mcp";  
import { DynamicWorkerExecutor } from "@cloudflare/codemode";  
const executor = new DynamicWorkerExecutor({ loader: env.LOADER });  
// Wrap an existing MCP server — all its tools become  
// typed methods the LLM can call from generated code  
const server = await codeMcpServer({ server: upstreamMcp, executor });  
```  
#### Zero-dependency main entry point

**Breaking change in v0.2.0:** `generateTypes` and the `ToolDescriptor` / `ToolDescriptors` types have moved to `@cloudflare/codemode/ai`:

  * [  JavaScript ](#tab-panel-3465)
  * [  TypeScript ](#tab-panel-3466)

**JavaScript**  
```js  
// Before  
import { generateTypes } from "@cloudflare/codemode";  
// After  
import { generateTypes } from "@cloudflare/codemode/ai";  
```

**TypeScript**  
```ts  
// Before  
import { generateTypes } from "@cloudflare/codemode";  
// After  
import { generateTypes } from "@cloudflare/codemode/ai";  
```  
The main entry point (`@cloudflare/codemode`) no longer requires the `ai` or `zod` peer dependencies. It now exports:

| Export                      | Description                                                 |
| --------------------------- | ----------------------------------------------------------- |
| sanitizeToolName            | Sanitize tool names into valid JS identifiers               |
| normalizeCode               | Normalize LLM-generated code into async arrow functions     |
| generateTypesFromJsonSchema | Generate TypeScript type definitions from plain JSON Schema |
| jsonSchemaToType            | Convert a single JSON Schema to a TypeScript type string    |
| DynamicWorkerExecutor       | Sandboxed code execution via Dynamic Worker Loader          |
| ToolDispatcher              | RPC target for dispatching tool calls from sandbox to host  |  
The `ai` and `zod` peer dependencies are now optional — only required when importing from `@cloudflare/codemode/ai`.  
#### Custom sandbox modules  
`DynamicWorkerExecutor` now accepts an optional `modules` option to inject custom ES modules into the sandbox:

  * [  JavaScript ](#tab-panel-3473)
  * [  TypeScript ](#tab-panel-3474)

**JavaScript**  
```js  
const executor = new DynamicWorkerExecutor({  
  loader: env.LOADER,  
  modules: {  
    "utils.js": `export function add(a, b) { return a + b; }`,  
  },  
});  
// Sandbox code can then: import { add } from "utils.js"  
```

**TypeScript**  
```ts  
const executor = new DynamicWorkerExecutor({  
  loader: env.LOADER,  
  modules: {  
    "utils.js": `export function add(a, b) { return a + b; }`,  
  },  
});  
// Sandbox code can then: import { add } from "utils.js"  
```  
#### Internal normalization and sanitization  
`DynamicWorkerExecutor` now normalizes code and sanitizes tool names internally. You no longer need to call `normalizeCode()` or `sanitizeToolName()` before passing code and functions to `execute()`.  
#### Upgrade  
```sh  
npm i @cloudflare/codemode@latest  
```  
See the [Code Mode documentation](https://edgetunnel-b2h.pages.dev/agents/tools/codemode/) for the full API reference.

Mar 17, 2026
1. ### [Log AI Gateway request metadata without storing payloads](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-17-collect-log-payload-header/)  
[ AI Gateway ](https://edgetunnel-b2h.pages.dev/ai-gateway/)  
AI Gateway now supports the `cf-aig-collect-log-payload` header, which controls whether request and response bodies are stored in logs. By default, this header is set to `true` and payloads are stored alongside metadata. Set this header to `false` to skip payload storage while still logging metadata such as token counts, model, provider, status code, cost, and duration.  
This is useful when you need usage metrics but do not want to persist sensitive prompt or response data.  
```bash  
curl https://gateway.ai.cloudflare.com/v1/$ACCOUNT_ID/$GATEWAY_ID/openai/chat/completions \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --header 'cf-aig-collect-log-payload: false' \
  --data '{  
    "model": "gpt-4o-mini",  
    "messages": [  
      {  
        "role": "user",  
        "content": "What is the email address and phone number of user123?"  
      }  
    ]  
  }'  
```  
For more information, refer to [Logging](https://edgetunnel-b2h.pages.dev/ai-gateway/observability/logging/#collect-log-payload-cf-aig-collect-log-payload).

Mar 16, 2026
1. ### [Return up to 50 query results with values or metadata](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-16-topk-limit-increased-to-50/)  
[ Vectorize ](https://edgetunnel-b2h.pages.dev/vectorize/)  
You can now set `topK` up to `50` when a Vectorize query returns values or full metadata. This raises the previous limit of `20` for queries that use `returnValues: true` or `returnMetadata: "all"`.  
Use the higher limit when you need more matches in a single query response without dropping values or metadata. Refer to the [Vectorize API reference](https://edgetunnel-b2h.pages.dev/vectorize/reference/client-api/) for query options and current `topK` limits.

Mar 15, 2026
1. ### [Access Durable Object name via \`ctx.id.name\`](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-15-durable-object-id-name/)  
[ Durable Objects ](https://edgetunnel-b2h.pages.dev/durable-objects/)[ Workers ](https://edgetunnel-b2h.pages.dev/workers/)  
When your Worker accesses a Durable Object via `idFromName()` or `getByName()`, the same name is now available on `ctx.id.name` inside the object — no need to pass it through method arguments or persist it in storage. This brings the runtime behavior in line with the [Workers runtime types](https://edgetunnel-b2h.pages.dev/workers/languages/typescript/).  
This is especially useful for [alarms](https://edgetunnel-b2h.pages.dev/durable-objects/api/alarms/), where there is no calling client to pass the name as an argument. When an alarm handler runs, `ctx.id.name` will hold the same name the object was originally accessed with.

**JavaScript**  
```js  
import { DurableObject } from "cloudflare:workers";  
export class ChatRoom extends DurableObject {  
  async getRoomName() {  
    // ctx.id.name returns the name passed to getByName() or idFromName()  
    return this.ctx.id.name;  
  }  
}  
// Worker  
export default {  
  async fetch(request, env) {  
    const stub = env.CHAT_ROOM.getByName("general");  
    const roomName = await stub.getRoomName();  
    return new Response(`Welcome to ${roomName}!`);  
  },  
};  
```  
`ctx.id.name` is `undefined` in the following cases:

  * For Durable Objects created with `newUniqueId()`.
  * When accessed via `idFromString()`, even if the ID was originally created from a name.
  * For [names longer than 1,024 bytes](https://edgetunnel-b2h.pages.dev/durable-objects/api/id/#name).  
This works the same way in local development with `wrangler dev` as it does in production. Run `npm update wrangler` to ensure you are on a version with this support.  
For more information, refer to the [Durable Object ID documentation](https://edgetunnel-b2h.pages.dev/durable-objects/api/id/#name).

Mar 12, 2026
1. ### [SSH into running Container instances](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-12-ssh-support/)  
[ Containers ](https://edgetunnel-b2h.pages.dev/containers/)  
You can now SSH into running Container instances using Wrangler. This is useful for debugging, inspecting running processes, or executing one-off commands inside a Container.  
To connect, enable `wrangler_ssh` in your Container configuration and add your `ssh-ed25519` public key to `authorized_keys`:

  * [  wrangler.jsonc ](#tab-panel-3455)
  * [  wrangler.toml ](#tab-panel-3456)

**JSONC**  
```jsonc  
{  
  "containers": [  
    {  
      "wrangler_ssh": {  
        "enabled": true  
      },  
      "authorized_keys": [  
        {  
          "name": "<NAME>",  
          "public_key": "<YOUR_PUBLIC_KEY_HERE>"  
        }  
      ]  
    }  
  ]  
}  
```

**TOML**  
```toml  
[[containers]]  
[containers.wrangler_ssh]  
enabled = true  
[[containers.authorized_keys]]  
name = "<NAME>"  
public_key = "<YOUR_PUBLIC_KEY_HERE>"  
```  
Then connect with:  
```sh  
wrangler containers ssh <INSTANCE_ID>  
```  
You can also run a single command without opening an interactive shell:  
```sh  
wrangler containers ssh <INSTANCE_ID> -- ls -al  
```  
Use `wrangler containers instances <APPLICATION>` to find the instance ID for a running Container.  
For more information, refer to the [SSH documentation](https://edgetunnel-b2h.pages.dev/containers/ssh/).

Mar 12, 2026
1. ### [List Container instances with \`wrangler containers instances\`](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-12-wrangler-containers-instances/)  
[ Containers ](https://edgetunnel-b2h.pages.dev/containers/)  
A new [wrangler containers instances](https://edgetunnel-b2h.pages.dev/workers/wrangler/commands/containers/#containers-instances) command lists all instances for a given Container application. This mirrors the instances view in the Cloudflare dashboard.  
The command displays each instance's ID, name, state, location, version, and creation time:  
```sh  
wrangler containers instances <APPLICATION_ID>  
```  
Use the `--json` flag for machine-readable output, which is also the default format in non-interactive environments such as CI pipelines.  
For the full list of options, refer to the [containers instances command reference](https://edgetunnel-b2h.pages.dev/workers/wrangler/commands/containers/#containers-instances).

Mar 11, 2026
1. ### [NVIDIA Nemotron 3 Super now available on Workers AI](https://edgetunnel-b2h.pages.dev/changelog/post/2026-03-11-nemotron-3-super-workers-ai/)  
[ Workers AI ](https://edgetunnel-b2h.pages.dev/workers-ai/)  
We're excited to partner with NVIDIA to bring [@cf/nvidia/nemotron-3-120b-a12b](https://edgetunnel-b2h.pages.dev/workers-ai/models/nemotron-3-120b-a12b/) to Workers AI. NVIDIA Nemotron 3 Super is a Mixture-of-Experts (MoE) model with a hybrid Mamba-transformer architecture, 120B total parameters, and 12B active parameters per forward pass.  
The model is optimized for running many collaborating agents per application. It delivers high accuracy for reasoning, tool calling, and instruction following across complex multi-step tasks.

**Key capabilities:**

  * **Hybrid Mamba-transformer architecture** delivers over 50% higher token generation throughput compared to leading open models, reducing latency for real-world applications
  * **Tool calling** support for building AI agents that invoke tools across multiple conversation turns
  * **Multi-Token Prediction (MTP)** accelerates long-form text generation by predicting several future tokens simultaneously in a single forward pass
  * **32,000 token context window** for retaining conversation history and plan states across multi-step agent workflows  
Prompt caching  
For optimal performance with multi-turn conversations, send the `x-session-affinity` header with a unique session identifier to enable prompt caching. This routes requests to the same model instance, reducing latency and inference costs. For details, refer to [Prompt caching](https://edgetunnel-b2h.pages.dev/workers-ai/features/prompt-caching/).  
Use Nemotron 3 Super through the [Workers AI binding](https://edgetunnel-b2h.pages.dev/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, or the [OpenAI-compatible endpoint](https://edgetunnel-b2h.pages.dev/workers-ai/configuration/open-ai-compatibility/).  
For more information, refer to the [Nemotron 3 Super model page](https://edgetunnel-b2h.pages.dev/workers-ai/models/nemotron-3-120b-a12b/).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://edgetunnel-b2h.pages.dev/changelog/product-group/developer-platform/7/#page","headline":"Developer platform Changelog | Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/changelog/product-group/developer-platform/7/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/cf-twitter-card.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
```
