llmProviderMessageSchema: ZodUnion<
    [
        ZodDiscriminatedUnion<
            "role",
            [
                ZodObject<
                    {
                        content: ZodUnion<
                            [
                                ZodArray<
                                    ZodObject<
                                        { text: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { text: ...; type: ... },
                                        { text: ...; type: ... },
                                    >,
                                    "many",
                                >,
                                ZodString,
                            ],
                        >;
                        name: ZodOptional<ZodString>;
                        role: ZodLiteral<"assistant">;
                        tool_call_id: ZodOptional<ZodString>;
                        tool_calls: ZodOptional<
                            ZodArray<
                                ZodObject<
                                    {
                                        function: ZodObject<(...), (...), (...), (...), (...)>;
                                        id: ZodString;
                                        type: ZodEffects<(...), (...), (...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    { function: (...) & (...); id: string; type: "function" },
                                    { function: (...) & (...); id: string; type?: (...) | (...) },
                                >,
                                "many",
                            >,
                        >;
                    },
                    "passthrough",
                    ZodTypeAny,
                    objectOutputType<
                        {
                            content: ZodUnion<
                                [
                                    ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                                    ZodString,
                                ],
                            >;
                            name: ZodOptional<ZodString>;
                            role: ZodLiteral<"assistant">;
                            tool_call_id: ZodOptional<ZodString>;
                            tool_calls: ZodOptional<
                                ZodArray<
                                    ZodObject<
                                        { function: ...; id: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { function: ...; id: ...; type: ... },
                                        { function: ...; id: ...; type?: ... },
                                    >,
                                    "many",
                                >,
                            >;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                    objectInputType<
                        {
                            content: ZodUnion<
                                [
                                    ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                                    ZodString,
                                ],
                            >;
                            name: ZodOptional<ZodString>;
                            role: ZodLiteral<"assistant">;
                            tool_call_id: ZodOptional<ZodString>;
                            tool_calls: ZodOptional<
                                ZodArray<
                                    ZodObject<
                                        { function: ...; id: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { function: ...; id: ...; type: ... },
                                        { function: ...; id: ...; type?: ... },
                                    >,
                                    "many",
                                >,
                            >;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                >,
                ZodObject<
                    {
                        content: ZodUnion<
                            [
                                ZodArray<
                                    ZodObject<
                                        { text: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { text: ...; type: ... },
                                        { text: ...; type: ... },
                                    >,
                                    "many",
                                >,
                                ZodString,
                            ],
                        >;
                        role: ZodLiteral<"tool">;
                        tool_call_id: ZodString;
                    },
                    "passthrough",
                    ZodTypeAny,
                    objectOutputType<
                        {
                            content: ZodUnion<
                                [
                                    ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                                    ZodString,
                                ],
                            >;
                            role: ZodLiteral<"tool">;
                            tool_call_id: ZodString;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                    objectInputType<
                        {
                            content: ZodUnion<
                                [
                                    ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                                    ZodString,
                                ],
                            >;
                            role: ZodLiteral<"tool">;
                            tool_call_id: ZodString;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                >,
                ZodObject<
                    {
                        content: ZodNullable<ZodString>;
                        name: ZodString;
                        role: ZodLiteral<"function">;
                    },
                    "passthrough",
                    ZodTypeAny,
                    objectOutputType<
                        {
                            content: ZodNullable<ZodString>;
                            name: ZodString;
                            role: ZodLiteral<"function">;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                    objectInputType<
                        {
                            content: ZodNullable<ZodString>;
                            name: ZodString;
                            role: ZodLiteral<"function">;
                        },
                        ZodTypeAny,
                        "passthrough",
                    >,
                >,
            ],
        >,
        ZodObject<
            {
                content: ZodUnion<
                    [
                        ZodString,
                        ZodArray<
                            ZodDiscriminatedUnion<
                                "type",
                                [
                                    ZodObject<
                                        { text: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { text: ...; type: ... },
                                        { text: ...; type: ... },
                                    >,
                                    ZodObject<
                                        { source: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { source: ...; type: ... },
                                        { source: ...; type: ... },
                                    >,
                                    ZodObject<
                                        { id: ...; input: ...; name: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { id: ...; input: ...; name: ...; type: ... },
                                        { id: ...; input: ...; name: ...; type: ... },
                                    >,
                                    ZodObject<
                                        { content: ...; is_error: ...; tool_use_id: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { content: ...; is_error?: ...; tool_use_id: ...; type: ... },
                                        { content: ...; is_error?: ...; tool_use_id: ...; type: ... },
                                    >,
                                ],
                            >,
                            "many",
                        >,
                    ],
                >;
                role: ZodEnum<["user", "assistant"]>;
            },
            "passthrough",
            ZodTypeAny,
            objectOutputType<
                {
                    content: ZodUnion<
                        [
                            ZodString,
                            ZodArray<
                                ZodDiscriminatedUnion<
                                    "type",
                                    [
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                    ],
                                >,
                                "many",
                            >,
                        ],
                    >;
                    role: ZodEnum<["user", "assistant"]>;
                },
                ZodTypeAny,
                "passthrough",
            >,
            objectInputType<
                {
                    content: ZodUnion<
                        [
                            ZodString,
                            ZodArray<
                                ZodDiscriminatedUnion<
                                    "type",
                                    [
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                        ZodObject<(...), (...), (...), (...), (...)>,
                                    ],
                                >,
                                "many",
                            >,
                        ],
                    >;
                    role: ZodEnum<["user", "assistant"]>;
                },
                ZodTypeAny,
                "passthrough",
            >,
        >,
        ZodObject<
            {
                content: ZodUnion<
                    [
                        ZodString,
                        ZodArray<
                            ZodDiscriminatedUnion<
                                "type",
                                [
                                    ZodObject<
                                        { text: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { text: ...; type: ... },
                                        { text: ...; type: ... },
                                    >,
                                    ZodObject<
                                        { tool_call: ...; tool_call_id: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { tool_call: ...; tool_call_id: ...; type: ... },
                                        { tool_call: ...; tool_call_id: ...; type: ... },
                                    >,
                                    ZodObject<
                                        { tool_call_id: ...; tool_result: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { tool_call_id: ...; tool_result: ...; type: ... },
                                        { tool_call_id: ...; tool_result: ...; type: ... },
                                    >,
                                ],
                            >,
                            "many",
                        >,
                    ],
                >;
                role: ZodEnum<
                    ["system", "developer", "user", "assistant", "model", "ai", "tool"],
                >;
            },
            "strip",
            ZodTypeAny,
            {
                content: | string
                | (
                    | { text: string; type: "text" }
                    | {
                        tool_call: { arguments: string; name: string; type: "function" };
                        tool_call_id: string;
                        type: "tool_call";
                    }
                    | {
                        tool_call_id: string;
                        tool_result: | null
                        | string
                        | number
                        | boolean
                        | unknown[]
                        | Record<string, unknown>;
                        type: "tool_result";
                    }
                )[];
                role: | "user"
                | "assistant"
                | "model"
                | "ai"
                | "tool"
                | "system"
                | "developer";
            },
            {
                content: | string
                | (
                    | { text: string; type: "text" }
                    | {
                        tool_call: { arguments: string; name: string; type: "function" };
                        tool_call_id: string;
                        type: "tool_call";
                    }
                    | {
                        tool_call_id: string;
                        tool_result: | null
                        | string
                        | number
                        | boolean
                        | unknown[]
                        | Record<string, unknown>;
                        type: "tool_result";
                    }
                )[];
                role: | "user"
                | "assistant"
                | "model"
                | "ai"
                | "tool"
                | "system"
                | "developer";
            },
        >,
        ZodDiscriminatedUnion<
            "role",
            [
                ZodObject<
                    { content: ZodString; role: ZodLiteral<"system"> },
                    "strip",
                    ZodTypeAny,
                    { content: string; role: "system" },
                    { content: string; role: "system" },
                >,
                ZodObject<
                    {
                        content: ZodUnion<
                            [ZodArray<ZodUnion<[(...), (...)]>, "many">, ZodString],
                        >;
                        role: ZodLiteral<"user">;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        content: | string
                        | (
                            | { text: string; type: "text" }
                            | { image: string; mimeType?: (...) | (...); type: "image" }
                        )[];
                        role: "user";
                    },
                    {
                        content: | string
                        | (
                            | { text: string; type: "text" }
                            | { image: string; mimeType?: (...) | (...); type: "image" }
                        )[];
                        role: "user";
                    },
                >,
                ZodObject<
                    {
                        content: ZodUnion<
                            [ZodArray<ZodUnion<[(...), (...)]>, "many">, ZodString],
                        >;
                        role: ZodLiteral<"assistant">;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        content: | string
                        | (
                            | { text: string; type: "text" }
                            | {
                                args: JSONLiteral;
                                toolCallId: string;
                                toolName: string;
                                type: "tool-call";
                            }
                        )[];
                        role: "assistant";
                    },
                    {
                        content: | string
                        | (
                            | { text: string; type: "text" }
                            | {
                                args: JSONLiteral;
                                toolCallId: string;
                                toolName: string;
                                type: "tool-call";
                            }
                        )[];
                        role: "assistant";
                    },
                >,
                ZodObject<
                    {
                        content: ZodArray<
                            ZodObject<
                                {
                                    result: ZodType<JSONLiteral, ZodTypeDef, JSONLiteral>;
                                    toolCallId: ZodString;
                                    toolName: ZodString;
                                    type: ZodLiteral<"tool-result">;
                                },
                                "strip",
                                ZodTypeAny,
                                {
                                    result: JSONLiteral;
                                    toolCallId: string;
                                    toolName: string;
                                    type: "tool-result";
                                },
                                {
                                    result: JSONLiteral;
                                    toolCallId: string;
                                    toolName: string;
                                    type: "tool-result";
                                },
                            >,
                            "many",
                        >;
                        role: ZodLiteral<"tool">;
                    },
                    "strip",
                    ZodTypeAny,
                    {
                        content: {
                            result: JSONLiteral;
                            toolCallId: string;
                            toolName: string;
                            type: "tool-result";
                        }[];
                        role: "tool";
                    },
                    {
                        content: {
                            result: JSONLiteral;
                            toolCallId: string;
                            toolName: string;
                            type: "tool-result";
                        }[];
                        role: "tool";
                    },
                >,
            ],
        >,
    ],
> = ...

Union of all message formats