function modelMessageToUIMessage(modelMessage, id?): UIMessage;Defined in: packages/ai/src/activities/chat/messages.ts:396
Convert a ModelMessage to UIMessage
This conversion creates a parts-based structure:
content field → TextPart
toolCalls array → ToolCallPart[]
role="tool" messages should be converted separately and merged
The ModelMessage to convert
string
Optional ID for the UIMessage (generated if not provided)
A UIMessage with parts