Skip to content

Cloudflare freezes two Agents SDK packages in favour of createAI

workers-ai-provider and ai-gateway-provider stop getting new features today. createAI, a single AI SDK provider, takes over Workers AI, AI Gateway and vendor models.

Source: Cloudflare

Cloudflare’s Agents SDK gained a createAI function that unifies what workers-ai-provider and ai-gateway-provider used to do separately, and as of 21 October both of those older packages are feature-frozen. They still work, but new capabilities land in createAI only.

createAI returns a full AI SDK ProviderV4, so a model it produces works anywhere the AI SDK accepts one: generateText, streamText, tools, structured output, and Think.

import { createAI } from "agents/models/ai-sdk";

const ai = createAI({ binding: env.AI });

const { text } = await generateText({
  model: ai("@cf/zai-org/glm-4.7-flash"),
  prompt: "Say hello in three words",
});

A plain @cf/-prefixed string runs through env.AI.run(), an author/model string resolves against the AI Gateway catalogue, dynamic/<route> targets a dynamic route, and a vendor’s own AI SDK model object (@ai-sdk/anthropic and similar) goes straight to AI Gateway’s provider-native endpoint. One function, four model sources.

Why it matters: if you’re on workers-ai-provider or ai-gateway-provider, nothing breaks today, but you’re no longer on the path that gets new features. Cloudflare says some capabilities, like dynamic route model IDs and stream resume, still only exist in the old packages, so full migration isn’t possible for everyone yet, worth checking before you commit to the switch.

Share

Related reading

More from The Wire

All briefs