What changed
Cloudflare introduced createAI in its Agents SDK as a single provider factory for the AI SDK and Pi AI. The Oct. 21 changelog says it replaces the separate workers-ai-provider and ai-gateway-provider packages, which are now feature-frozen and deprecated.
The new interface can select a Workers AI model such as @cf/zai-org/glm-4.7-flash, an AI Gateway catalog model such as anthropic/claude-opus-5.5, a configured dynamic route, or a vendor-native model object. It can be created from a Worker AI binding or from an account ID and API token.
Why it matters
The important change is not just a shorter import. Model choice, provider credentials, fallback order, caching, logging, metadata, retries, BYOK aliases, and stream resume now sit behind one application-facing surface. A product can start with a Workers AI model, move to a hosted vendor model, or use a gateway route without rewriting its streaming and tool-calling layer.
That makes model portability a runtime feature instead of an architectural project. It also gives teams a clearer place to add operational policy: the gateway can hold vendor keys, select providers, and report which model actually answered. Cloudflare's documentation says the same provider covers text, tools, structured output, embeddings, images, speech, transcription, and reranking in the AI SDK.
The builder takeaway
For a new Worker, the migration path is straightforward: install the Agents SDK, create one provider from the AI binding, and pass model IDs to the AI SDK. The tradeoff is that the providers are still marked beta, so teams should isolate the provider construction behind their own small adapter and keep an eye on the model-ID and package migration notes.
The broader product signal is that the AI gateway is becoming the application boundary. Builders increasingly want to change models for cost, latency, availability, or capability without changing the rest of the product. createAI packages that flexibility into the default developer experience.