Agents SDK packages support AI SDK v6 and v7
Key Points
- Supports AI SDK v6 and v7
- Match AI SDK major with @ai-sdk/react major
- Think normalizes streaming and telemetry
Summary
Cloudflare Agents packages (agents, @cloudflare/ai-chat, @cloudflare/codemode, @cloudflare/think) now support both AI SDK v6 and v7. Existing applications can remain on AI SDK v6 when updating these packages, or adopt v7 without changing Cloudflare Agents APIs.
Key Points
- Supported peer ranges:
ai@^6 || ^7and@ai-sdk/react@^3 || ^4. - Match major versions: pair AI SDK v6 with
@ai-sdk/reactv3, or AI SDK v7 with@ai-sdk/reactv4. - Think normalizes streaming, tool completion events, and telemetry across both SDK versions; v6 apps do not need to migrate integrations before updating Think.
- Existing Cloudflare Agents APIs remain stable when upgrading the packages.
Installation (install latest packages with AI SDK v7)
npm i agents@latest @cloudflare/ai-chat@latest @cloudflare/codemode@latest @cloudflare/think@latest ai@^7 @ai-sdk/react@^4
yarn add agents@latest @cloudflare/ai-chat@latest @cloudflare/codemode@latest @cloudflare/think@latest ai@^7 @ai-sdk/react@^4
pnpm add agents@latest @cloudflare/ai-chat@latest @cloudflare/codemode@latest @cloudflare/think@latest ai@^7 @ai-sdk/react@^4
bun add agents@latest @cloudflare/ai-chat@latest @cloudflare/codemode@latest @cloudflare/think@latest ai@^7 @ai-sdk/react@^4
Action for engineers
- Choose the AI SDK major you want (v6 or v7) and install the matching
@ai-sdk/reactmajor. - Update package versions; no API changes required for Cloudflare Agents usage.
- See the Think documentation for setup and usage details.