Arize Phoenix TS
    Preparing search index...
    openAIMessageToAnthropic: ZodPipe<
        ZodDiscriminatedUnion<
            [
                ZodObject<
                    {
                        content: ZodUnion<
                            readonly [
                                ZodArray<
                                    ZodObject<{ text: ZodString; type: ZodLiteral<(...)> }, $strip>,
                                >,
                                ZodString,
                            ],
                        >;
                        name: ZodOptional<ZodString>;
                        role: ZodLiteral<"assistant">;
                        tool_call_id: ZodOptional<ZodString>;
                        tool_calls: ZodOptional<
                            ZodArray<
                                ZodObject<
                                    {
                                        function: ZodObject<{ arguments: ...; name: ... }, $loose>;
                                        id: ZodString;
                                        type: ZodPipe<ZodOptional<(...)>, ZodTransform<(...), (...)>>;
                                    },
                                    $strip,
                                >,
                            >,
                        >;
                    },
                    $loose,
                >,
                ZodObject<
                    {
                        content: ZodUnion<
                            readonly [
                                ZodArray<
                                    ZodObject<{ text: ZodString; type: ZodLiteral<(...)> }, $strip>,
                                >,
                                ZodString,
                            ],
                        >;
                        role: ZodLiteral<"tool">;
                        tool_call_id: ZodString;
                    },
                    $loose,
                >,
                ZodObject<
                    {
                        content: ZodNullable<ZodString>;
                        name: ZodString;
                        role: ZodLiteral<"function">;
                    },
                    $loose,
                >,
            ],
            "role",
        >,
        ZodTransform<
            {
                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;
            },
            | {
                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;
            },
        >,
    > = ...

    Hub → Spoke: Convert an OpenAI message to Anthropic format