Conversation
|
Claude Code ReviewMigration Quality: Strong Issues Found:
Architecture:
Minor observations:
|
commit: |
5ee85a4 to
58c81ec
Compare
This documentation update syncs changes from cloudflare/agents PR #733 (migration to AI SDK v6). **Changes:** - Added comprehensive migration guide for upgrading from AI SDK v5 to v6 (beta) - Documented breaking changes including unified tool pattern, async convertToModelMessages(), and removed CoreMessage type - Included examples showing before/after code patterns - Listed deprecated APIs and their replacements - Documented new v6 features: Agent abstraction, tool execution approval, structured output with tool calling, and reranking support - Added migration checklist for package updates and code changes Related PR: cloudflare/agents#733
threepointone
left a comment
There was a problem hiding this comment.
I've rebased and approved this with a couple of comments. I don't recommend landing this until the sdk release is out, because the way we now do peer deps will break people if it's not a semver version string. We can land and release it the minute we know ai sdk is going out.
| * Provide output for a tool call. Use this for tools that require user interaction | ||
| * or client-side execution. | ||
| */ | ||
| addToolOutput: (opts: AddToolOutputOptions) => void; |
|
|
||
| // Effect for new onToolCall callback pattern (v6 style) | ||
| // This fires when there are tool calls that need client-side handling | ||
| useEffect(() => { |
There was a problem hiding this comment.
this probably needs a test
Co-authored-by: Sunil Pai <spai@cloudflare.com>
a4f5948 to
6bf4bb5
Compare
This commit adds comprehensive documentation for migrating from AI SDK v5 to v6 when using the Cloudflare Agents SDK. The guide covers: - Breaking changes including unified tool pattern, async convertToModelMessages, CoreMessage type removal, and generateObject mode option removal - Deprecated APIs and their replacements - New v6 features: Agent abstraction, tool execution approval, structured output with tool calling, and reranking support - Step-by-step migration checklist - Third-party provider compatibility notes This documentation is synced from PR #733 in cloudflare/agents which implements the migration to AI SDK v6 beta with unified tool pattern. Related PR: cloudflare/agents#733
Migrate Agents SDK to AI SDK v6 beta with unified tool pattern.
Changes
AI SDK v6 Updates
Unified Tool Pattern
Simplified client-side tool handling by adopting AI SDK v6's native pattern.
Before:
After:
New APIs
Deprecated (still functional)
Docs