---
title: "MessagePart"
description: "AI SDK v6 `UIMessage.parts[]` element. Loose shape for forward-compat — the
runner emits whatever part types it uses; consumers render based on `type`.
Known types: `text`, `reasoning`, `tool-{name}`, `dynamic-tool`, `file`,
`source-url`, `source-document`, `data-{name}`, `step-start`.
Extended thinking blocks must round-trip verbatim to preserve signatures."
section: "Reference"
group: "Types"
order: 151
---

## Definition

```ts
interface MessagePart {
  [x: string]: unknown;
  type: string;
}
```

## Fields

| Field  | Type     | Notes                                 |
| ------ | -------- | ------------------------------------- |
| `type` | `string` | `required` — Part type discriminator. |
