-
Notifications
You must be signed in to change notification settings - Fork 1
Update to AI SDK v6 and latest dependencies #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the AI SDK from version 4.x to 5.x along with updating Next.js, assistant-ui packages, and the mem0 provider. The migration involves significant API changes including the adoption of new streaming patterns and data structures.
Changes:
- Upgraded core dependencies: AI SDK to v5.0.116, Next.js to 15.2.8, assistant-ui packages to latest versions, and mem0 provider to 2.0.5
- Migrated API route to use v5 patterns:
createUIMessageStream,convertToModelMessages, and new data part structures - Updated client to use
DefaultChatTransportforuseChatRuntimeconfiguration - Refactored memory-ui to read from
DataMessagePartin message content instead of annotations
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| package.json | Updated all major dependencies to latest versions, added zod as new dependency |
| app/api/chat/route.ts | Migrated to AI SDK v5 APIs with new streaming and message conversion patterns |
| app/assistant.tsx | Updated to use DefaultChatTransport with useMemo for runtime configuration |
| components/assistant-ui/memory-ui.tsx | Refactored to read DataMessagePart from content instead of annotations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e58499f0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
7e58499 to
e830809
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e830809 to
a3c7277
Compare
- Upgrade ai package from 4.x to 5.x - Upgrade Next.js to 15.5.9 - Upgrade @assistant-ui/react to 0.11.57 and @assistant-ui/react-ai-sdk to 1.1.21 - Upgrade @mem0/vercel-ai-provider to 2.0.5 - Migrate API route to use createUIMessageStream and convertToModelMessages - Update client to use DefaultChatTransport for useChatRuntime - Update memory-ui to read DataMessagePart from message content - Use frontendTools() helper for proper tool parameter handling - Add loading state to prevent userId race condition
a3c7277 to
af70e05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Update ai to ^6.0.42 - Update @ai-sdk/openai to ^3.0.13 - Add @ai-sdk/react ^3.0.44 - Update @assistant-ui/react to ^0.11.58 - Update @assistant-ui/react-ai-sdk to ^1.2.0 - Update zod to ^4.3.5 - Add await to convertToModelMessages (required in v6) - Add Array.isArray runtime check in memory-ui.tsx - Add userId validation in API route - Clarify v6 data part format comment
402f33b to
7a13e43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Changes
createUIMessageStreamandconvertToModelMessagesawaittoconvertToModelMessages()(required in AI SDK v6)DefaultChatTransportforuseChatRuntimefrontendTools()helper for proper tool parameter handlingTest plan