anthropicMessageSchema: ZodObject<
    {
        content: ZodUnion<
            [
                ZodString,
                ZodArray<
                    ZodDiscriminatedUnion<
                        "type",
                        [
                            ZodObject<
                                { text: ZodString; type: ZodLiteral<"text"> },
                                "strip",
                                ZodTypeAny,
                                { text: string; type: "text" },
                                { text: string; type: "text" },
                            >,
                            ZodObject<
                                {
                                    source: ZodObject<
                                        { data: ...; media_type: ...; type: ... },
                                        "strip",
                                        ZodTypeAny,
                                        { data: ...; media_type: ...; type: ... },
                                        { data: ...; media_type: ...; type: ... },
                                    >;
                                    type: ZodLiteral<"image">;
                                },
                                "strip",
                                ZodTypeAny,
                                {
                                    source: {
                                        data: string;
                                        media_type: (...)
                                        | (...)
                                        | (...)
                                        | (...);
                                        type: "base64";
                                    };
                                    type: "image";
                                },
                                {
                                    source: {
                                        data: string;
                                        media_type: (...)
                                        | (...)
                                        | (...)
                                        | (...);
                                        type: "base64";
                                    };
                                    type: "image";
                                },
                            >,
                            ZodObject<
                                {
                                    id: ZodString;
                                    input: ZodType<JSONLiteral, ZodTypeDef, JSONLiteral>;
                                    name: ZodString;
                                    type: ZodLiteral<"tool_use">;
                                },
                                "strip",
                                ZodTypeAny,
                                { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                                { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                            >,
                            ZodObject<
                                {
                                    content: ZodUnion<[(...), (...)]>;
                                    is_error: ZodOptional<ZodBoolean>;
                                    tool_use_id: ZodString;
                                    type: ZodLiteral<"tool_result">;
                                },
                                "strip",
                                ZodTypeAny,
                                {
                                    content: string
                                    | (...)[];
                                    is_error?: boolean;
                                    tool_use_id: string;
                                    type: "tool_result";
                                },
                                {
                                    content: string
                                    | (...)[];
                                    is_error?: boolean;
                                    tool_use_id: string;
                                    type: "tool_result";
                                },
                            >,
                        ],
                    >,
                    "many",
                >,
            ],
        >;
        role: ZodEnum<["user", "assistant"]>;
    },
    "passthrough",
    ZodTypeAny,
    objectOutputType<
        {
            content: ZodUnion<
                [
                    ZodString,
                    ZodArray<
                        ZodDiscriminatedUnion<
                            "type",
                            [
                                ZodObject<
                                    { text: ZodString; type: ZodLiteral<(...)> },
                                    "strip",
                                    ZodTypeAny,
                                    { text: string; type: "text" },
                                    { text: string; type: "text" },
                                >,
                                ZodObject<
                                    {
                                        source: ZodObject<(...), (...), (...), (...), (...)>;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        source: { data: ...; media_type: ...; type: ... };
                                        type: "image";
                                    },
                                    {
                                        source: { data: ...; media_type: ...; type: ... };
                                        type: "image";
                                    },
                                >,
                                ZodObject<
                                    {
                                        id: ZodString;
                                        input: ZodType<(...), (...), (...)>;
                                        name: ZodString;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                                    { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                                >,
                                ZodObject<
                                    {
                                        content: ZodUnion<(...)>;
                                        is_error: ZodOptional<(...)>;
                                        tool_use_id: ZodString;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        content: (...)
                                        | (...);
                                        is_error?: (...) | (...) | (...);
                                        tool_use_id: string;
                                        type: "tool_result";
                                    },
                                    {
                                        content: (...)
                                        | (...);
                                        is_error?: (...) | (...) | (...);
                                        tool_use_id: string;
                                        type: "tool_result";
                                    },
                                >,
                            ],
                        >,
                        "many",
                    >,
                ],
            >;
            role: ZodEnum<["user", "assistant"]>;
        },
        ZodTypeAny,
        "passthrough",
    >,
    objectInputType<
        {
            content: ZodUnion<
                [
                    ZodString,
                    ZodArray<
                        ZodDiscriminatedUnion<
                            "type",
                            [
                                ZodObject<
                                    { text: ZodString; type: ZodLiteral<(...)> },
                                    "strip",
                                    ZodTypeAny,
                                    { text: string; type: "text" },
                                    { text: string; type: "text" },
                                >,
                                ZodObject<
                                    {
                                        source: ZodObject<(...), (...), (...), (...), (...)>;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        source: { data: ...; media_type: ...; type: ... };
                                        type: "image";
                                    },
                                    {
                                        source: { data: ...; media_type: ...; type: ... };
                                        type: "image";
                                    },
                                >,
                                ZodObject<
                                    {
                                        id: ZodString;
                                        input: ZodType<(...), (...), (...)>;
                                        name: ZodString;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                                    { id: string; input: JSONLiteral; name: string; type: "tool_use" },
                                >,
                                ZodObject<
                                    {
                                        content: ZodUnion<(...)>;
                                        is_error: ZodOptional<(...)>;
                                        tool_use_id: ZodString;
                                        type: ZodLiteral<(...)>;
                                    },
                                    "strip",
                                    ZodTypeAny,
                                    {
                                        content: (...)
                                        | (...);
                                        is_error?: (...) | (...) | (...);
                                        tool_use_id: string;
                                        type: "tool_result";
                                    },
                                    {
                                        content: (...)
                                        | (...);
                                        is_error?: (...) | (...) | (...);
                                        tool_use_id: string;
                                        type: "tool_result";
                                    },
                                >,
                            ],
                        >,
                        "many",
                    >,
                ],
            >;
            role: ZodEnum<["user", "assistant"]>;
        },
        ZodTypeAny,
        "passthrough",
    >,
> = ...

TODO: rewrite as discriminated union