Conversation
Update packages/ai-core and related packages to use the latest Vercel AI SDK: - ai: 5.0.44 → 6.0.18 - @ai-sdk/react: 2.0.44 → 3.0.18 - @ai-sdk/openai-compatible: 1.0.18 → 2.0.4 - @ai-sdk/openai: 2.0.32 → 2.0.38 Breaking changes addressed: - convertToModelMessages is now async, updated all call sites to await - Added new tool states: approval-requested, approval-responded, output-denied - Updated UIMessageSchema with approval workflow support - Fixed type guards and component props for new tool states
feat: update Vercel AI SDK to v6
There was a problem hiding this comment.
Thanks! Do we need migration code for these changes?
|
Thanks 👍 I think it's better to update Vercel AI SDK v6 after I remove the openassistant dependencies: #280 |
|
Also, the agents in V6 is official now: https://vercel.com/blog/ai-sdk-6#agents We might need to update the related code in ai-core package. |
Add comprehensive test suites to ensure v5 data continues to work with v6 schemas: - UIMessageSchema.v5-compat.test.ts: Tests that v5 tool states (input-streaming, input-available, output-available, output-error) still validate correctly - chatTransport.v5-compat.test.ts: Tests completeIncompleteToolCalls handles both v5 and v6 tool states properly - utils.v5-compat.test.ts: Tests type guards (isToolPart, isDynamicToolPart, isTextPart, isReasoningPart) work with both v5 and v6 message formats All 112 tests pass across 7 test suites, including 40 new backwards compatibility tests.
- 40 tests → 11 tests - 786 lines → 182 lines (77% reduction) - Same coverage of essential v5→v6 compatibility scenarios
- Update agent framework docs to use ToolLoopAgent instead of Experimental_Agent - Update tool parameters (inputSchema -> parameters) - Add instructions parameter for agents (new in v6) - Update embedding provider docs to use embedding() method instead of textEmbeddingModel() - Update comments to reference AI SDK v6
tests: compatibility
|
Changes should be additive. Some backwards compatibility tests were added. Also docs updated and Experimental_ removed for agents. |
|
Hey @MentalGear, wanted to give you a heads-up since I'm working on something closely related. I've been working on a PR (#423) that removes the Are you still planning to continue this PR? Would love to avoid duplicating effort. If you are, I'd be happy to coordinate once the openassistant removal is merged. And if you've moved on, I'd be happy to take a stab at the v6 migration and build on the work you've started here. Either way, thanks for the groundwork. It's a helpful reference! |
|
Hey Thx for asking! No, feel free to take over!👍On 12 Mar 2026, at 12:11, Mihajlo Stojkovic ***@***.***> wrote:mihajlo-stojkovic left a comment (sqlrooms/sqlrooms#282)
Hey @MentalGear, wanted to give you a heads-up since I'm working on something closely related.
I've been working on a PR (#423) that removes the openassistant dependency (as mentioned in issue #280), which was flagged as a prerequisite for the v6 upgrade. Once that lands, the path to v6 should be cleaner.
Are you still planning to continue this PR? Would love to avoid duplicating effort. If you are, I'd be happy to coordinate once the openassistant removal is merged. And if you've moved on, I'd be happy to take a stab at the v6 migration and build on the work you've started here.
Either way, thanks for the groundwork. It's a helpful reference!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Update packages/ai-core and related packages to use the latest Vercel AI SDK:
Breaking changes addressed: