Skip to content

Conversation

@JustAnOkapi
Copy link

@JustAnOkapi JustAnOkapi commented Jan 20, 2026

Summary

  • Upgrade ai package from 4.x to 6.0.42
  • Upgrade @ai-sdk/openai to 3.0.13
  • Add @ai-sdk/react 3.0.44
  • Upgrade Next.js to 15.5.9
  • Upgrade @assistant-ui/react to 0.11.58 and @assistant-ui/react-ai-sdk to 1.2.0
  • Upgrade @mem0/vercel-ai-provider to 2.0.5
  • Upgrade zod to 4.3.5

Changes

  • Migrate API route to use createUIMessageStream and convertToModelMessages
  • Add await to convertToModelMessages() (required in AI SDK v6)
  • Update client to use DefaultChatTransport for useChatRuntime
  • Update memory-ui to read custom data parts from message content
  • Use frontendTools() helper for proper tool parameter handling
  • Add loading state to prevent userId race condition
  • Add runtime Array.isArray check in memory-ui for safety
  • Add userId validation in API route

Test plan

  • Build passes
  • Type check passes
  • Production server tested with mem0 integration
  • Memory indicators display correctly
  • Chat streaming works correctly with v6

Copilot AI review requested due to automatic review settings January 20, 2026 20:52
@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
assistant-ui-mem0-starter Ready Ready Preview, Comment Jan 21, 2026 5:30am

Request Review

Copy link

Copilot AI left a 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 DefaultChatTransport for useChatRuntime configuration
  • Refactored memory-ui to read from DataMessagePart in 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copy link

Copilot AI left a 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.

- 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
@JustAnOkapi JustAnOkapi changed the title Update to AI SDK v5 and latest dependencies Update to AI SDK v6 and latest dependencies Jan 21, 2026
@JustAnOkapi JustAnOkapi requested a review from Copilot January 21, 2026 05:09
Copy link

Copilot AI left a 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
Copy link

Copilot AI left a 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.

Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants