AI Compass / News
Cloudflare: createAI replaces workers-ai-provider and ai-gateway-provider
The two packages for Workers AI and AI Gateway will get no new features. Their replacement is createAI in the Agents SDK, and there is no deadline to switch.
Source: createAI replaces workers-ai-provider and ai-gateway-provider (Cloudflare Changelog),
Note: My domain and this website run on Cloudflare. Cloudflare does not pay me, and the links are not affiliate links.


What happened: On 21 October 2026, Cloudflare marked the workers-ai-provider and ai-gateway-provider packages as feature frozen and deprecated, so they will get no new features. Both connect the AI SDK, a JavaScript library for calling AI models through one interface, to Cloudflare. Their replacement is the new createAI function in Cloudflare’s Agents SDK (package agents, imported from agents/models/ai-sdk). It combines what the two packages did separately:
- Workers AI models, which run directly on Cloudflare
- models from the AI Gateway catalogue
- dynamic routes
- models from other providers
createAI connects either through the AI binding (a Worker’s built-in link to a Cloudflare service) or with an account ID and API token.
What this means: All Cloudflare says is “Please migrate at your convenience.” You can switch whenever it suits you, but new features will only arrive in createAI.
What you can do:
- Start new projects with
createAI: runnpm i agents, thenimport { createAI } from "agents/models/ai-sdk";. - Find existing code: search for
createWorkersAI,createAiGatewayandcreateAISearch. - Switch over as the changelog describes:
createWorkersAI({ binding })becomescreateAI({ binding })createWorkersAI({ accountId, apiKey })becomescreateAI({ accountId, apiToken })createAiGateway(...)becomescreateAI(...), with several models listed underfallbackcreateAISearchis nowcreateAISearchNamespacefrom theai-search-providerpackage
- Test afterwards: check that the backup model in
fallbackreally takes over when the first model does not respond.
Context: This is a maintenance notice with no pressure behind it. If you are not touching your code right now, switch the next time you do.
My workshops show you how to bring AI into your team. See the workshops