ContentPart:
| { text: string; type: "text" }
| { data: string; mimeType: string; type: "image" }
| {
id: string;
input: Record<string, unknown>;
name: string;
type: "tool-use";
}
| { signature?: string; text: string; type: "reasoning" }
| { data: string; type: "reasoning-redacted" }
| {
content: string;
isError?: boolean;
toolCallId: string;
type: "tool-result";
}
A part of a message.
imageis only honored when the resolved provider advertisesfeatures.vision(§2.5);tool-use/tool-resultonly when it advertisesfeatures.tools— branch on describeChat first.