Reasoning part not saved in Mastra Memory message history?

Is reasoning not being saved? I get reasoning streamed in during generation, but when inspecting hte mastra messages table, I only see the text and tool invocation parts.

I'd expect any data part to just be saved to the DB, as long as it's not transient: true.

EDIT: okay I see the issue. For some reason, it gets saved like this..

{
  "format": 2,
  "parts": [
    {
      "type": "reasoning",
      "reasoning": "",
      "details": [
        {
          "type": "text",
          "text": "The user is asking me to ..."
        }
      ]
    }
  ]
}


The reasoning property seems to be an empty string.

I'm on AI SDK v5 beta and the latest mastra beta release.


Is there a utility function that converts the Mastra history to a Vercel AI SDK v5 UI message array?

I'm not calling Mastra via useChat, but instead I use the memory API to fetch the message history.
Was this page helpful?