function uiMessagesToWire(messages, options?): WireMessage[];Defined in: packages/ai/src/utilities/ag-ui-wire.ts:81
Serialize TanStack UIMessages and ModelMessages into the AG-UI RunAgentInput.messages wire shape. Anchors are spec-only (id, role, name, content, toolCalls, metadata). Tool results and thinking parts on assistant messages are additionally emitted as fan-out {role:'tool',...} and {role:'reasoning',...} entries for strict AG-UI server consumers. Set includeSnapshotStructuredOutput to retain complete structured-output metadata for UI snapshots.
( | ModelMessage< | string | ContentPart<unknown, unknown, unknown, unknown, unknown>[] | null> | UIMessage<unknown>)[]
boolean