Skip to content

[Bug]: [mastra] Lost message.id when converting to mastra format#1687

Open
carloscco wants to merge 1 commit into
ag-ui-protocol:mainfrom
InditexTech:bugfix/GH-1659-lost-message-id
Open

[Bug]: [mastra] Lost message.id when converting to mastra format#1687
carloscco wants to merge 1 commit into
ag-ui-protocol:mainfrom
InditexTech:bugfix/GH-1659-lost-message-id

Conversation

@carloscco
Copy link
Copy Markdown
Contributor

Closes #1659

List of changes

  • Extended type CoreMessage from "@mastra/core/llm" package to include an optional id field. This id, if defined, is used in mastra's inputToMastraDBMessage, instead of generating a new one
  • Update tests to verify that id is included in the converted messages

An alternative could be to use MessageInput type from "@mastra/core/agent/message-list", as this is the expected type for agent.stream, but it would need changes (in tests at least) since it is a union members with incompatible shapes (content e.g. does not exist on all members)

@carloscco carloscco requested a review from a team as a code owner May 15, 2026 08:16
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@carloscco is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

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.

[Bug]: [mastra] Lost message.id when converting to mastra format

1 participant