Arize Phoenix TS
    Preparing search index...
    anthropicMessageToOpenAI: ZodPipe<
        ZodObject<
            {
                content: ZodUnion<
                    readonly [
                        ZodString,
                        ZodArray<
                            ZodDiscriminatedUnion<
                                [
                                    ZodObject<{ text: ZodString; type: ZodLiteral<(...)> }, $strip>,
                                    ZodObject<
                                        { source: ZodObject<(...), (...)>; type: ZodLiteral<(...)> },
                                        $strip,
                                    >,
                                    ZodObject<
                                        {
                                            id: ZodString;
                                            input: ZodType<(...), (...), (...)>;
                                            name: ZodString;
                                            type: ZodLiteral<(...)>;
                                        },
                                        $strip,
                                    >,
                                    ZodObject<
                                        {
                                            content: ZodUnion<(...)>;
                                            is_error: ZodOptional<(...)>;
                                            tool_use_id: ZodString;
                                            type: ZodLiteral<(...)>;
                                        },
                                        $strip,
                                    >,
                                ],
                                "type",
                            >,
                        >,
                    ],
                >;
                role: ZodEnum<{ assistant: "assistant"; user: "user" }>;
            },
            $loose,
        >,
        ZodTransform<
            | {
                content: string
                | { text: string; type: "text" }[];
                name?: string;
                role: "assistant";
                tool_call_id?: string;
                tool_calls?: {
                    function: { arguments: string; name: string; [key: string]: unknown };
                    id: string;
                    type: "function";
                }[];
                [key: string]: unknown;
            }
            | {
                content: string
                | { text: string; type: "text" }[];
                role: "tool";
                tool_call_id: string;
                [key: string]: unknown;
            }
            | {
                content: string
                | null;
                name: string;
                role: "function";
                [key: string]: unknown;
            }
            | {
                content: | string
                | (
                    | { text: string; type: "text" }
                    | { image_url: { url: string }; type: "image_url" }
                )[];
                name?: string;
                role: "user";
                [key: string]: unknown;
            }
            | {
                content: string
                | { text: string; type: "text" }[];
                name?: string;
                role: "system";
                [key: string]: unknown;
            }
            | {
                content: string
                | { text: string; type: "text" }[];
                name?: string;
                role: "developer";
                [key: string]: unknown;
            },
            {
                content: | string
                | (
                    | { id: string; input: JSONLiteral; name: string; type: "tool_use" }
                    | { text: string; type: "text" }
                    | {
                        source: {
                            data: string;
                            media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp";
                            type: "base64";
                        };
                        type: "image";
                    }
                    | {
                        content: | string
                        | ({ text: ...; type: ... } | { source: ...; type: ... })[];
                        is_error?: boolean;
                        tool_use_id: string;
                        type: "tool_result";
                    }
                )[];
                role: "user"
                | "assistant";
                [key: string]: unknown;
            },
        >,
    > = ...

    Spoke → Hub: Convert an Anthropic message to OpenAI format