# Cloudflare's agents 0.28.1 adds AI Gateway options and updates MCP packages

published: 2026-10-13T14:06:15.216Z
topic: frameworks
source: https://github.com/cloudflare/agents/releases/tag/agents%400.28.1
url: https://aiagentnews.io/stories/cloudflare-s-agents-0-28-1-adds-ai-gateway-options-and-updates-mcp-packages

Cloudflare has released agents 0.28.1, a patch that adds new AI Gateway routing options and moves its Model Context Protocol packages to newer versions. It also changes how MCP sessions ended with DELETE are handled and reworks the event stream of the OpenCode harness.

The release adds a zdr gateway option to createAI in the agents/models/ai-sdk and agents/models/pi-ai entry points, along with a vendorKey setting of "request" for AI SDK models routed through a team's own vendor key. createAI also accepts AI Gateway dynamic routes written as ai("dynamic/...").

On the MCP side, @modelcontextprotocol/client and @modelcontextprotocol/server move to 2.3.1 and @modelcontextprotocol/sdk moves to 1.32.1. The MCP client transports now follow redirects only within the same origin. McpAgent returns a 404 right away for a session that was ended with DELETE, and createMcpHandler closes a previous instance when a Legacy request's factory returns one that is still serving another request.

The OpenCodeHarness method session.events() now returns a snapshot of the session followed by events in the same kinds PiHarness reports, replacing the async iterable of raw OpenCode events. Those raw events remain available from session.log(). The OpenCode example now uses Workspace tools from @cloudflare/computer instead of OpenCode's local file and shell tools.

## Why it matters if you build agents

Code that consumes OpenCodeHarness events will need to move from the old async iterable to session.events(), or to session.log() if it still needs the raw OpenCode events.

Teams running MCP clients should confirm their redirect handling still works now that transports only follow redirects within the same origin.

Agents built with createAI can now send requests through their own vendor keys or through AI Gateway dynamic routes.
