Skip to content

AI Compass / News

Cloudflare: createAI replaces workers-ai-provider and ai-gateway-provider

Website Automation

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.

Technical drawing: two faded package boxes, workers-ai-provider and ai-gateway-provider, both marked DEPRECATED, merge into a highlighted createAI box from agents/models/ai-sdk. Lines run from it to WORKERS AI, AI GATEWAY, ROUTES and 3RD PARTY.Technical drawing: two faded package boxes, workers-ai-provider and ai-gateway-provider, both marked DEPRECATED, merge into a highlighted createAI box from agents/models/ai-sdk. Lines run from it to WORKERS AI, AI GATEWAY, ROUTES and 3RD PARTY.

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:

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:

  1. Start new projects with createAI: run npm i agents, then import { createAI } from "agents/models/ai-sdk";.
  2. Find existing code: search for createWorkersAI, createAiGateway and createAISearch.
  3. Switch over as the changelog describes:
    • createWorkersAI({ binding }) becomes createAI({ binding })
    • createWorkersAI({ accountId, apiKey }) becomes createAI({ accountId, apiToken })
    • createAiGateway(...) becomes createAI(...), with several models listed under fallback
    • createAISearch is now createAISearchNamespace from the ai-search-provider package
  4. Test afterwards: check that the backup model in fallback really 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