Type Alias ContentPart

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. image is only honored when the resolved provider advertises features.vision (§2.5); tool-use/tool-result only when it advertises features.tools — branch on describeChat first.