Agents, Workers AI, AI Gateway - createAI replaces workers-ai-provider and ai-gateway-provider
Cloudflare Agents SDK introduced createAI , unifying Workers AI and AI Gateway integrations while deprecating workers-ai-provider and ai-gateway-provider .
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
The Cloudflare Agents SDK introduced createAI for the AI SDK and Pi AI, consolidating functionality previously split across workers-ai-provider and ai-gateway-provider . The unified method handles Workers AI models, AI Gateway catalog models, dynamic routes, and vendor models using either the AI binding or an account ID with an API token. Consequently, workers-ai-provider and ai-gateway-provider are officially feature-frozen and marked as deprecated.
可执行摘要
Cloudflare deprecated workers-ai-provider and ai-gateway-provider in favor of a unified createAI function in the Agents SDK ( agents/models/ai-sdk ), supporting Workers AI models, AI Gateway catalogs, dynamic routes, and vendor models.
- Agent 实用度
- 96/100
- 可信度
- 90%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Install or update the agents package ( npm i agents ).
- Replace usage of workers-ai-provider and ai-gateway-provider with createAI from agents/models/ai-sdk (or Pi AI equivalents).
- Migrate existing configuration to pass env.AI bindings or account credentials directly to createAI .