anthropicToolChoiceToOpenAI: ZodEffects<
    ZodDiscriminatedUnion<
        "type",
        [
            ZodObject<
                { name: ZodString; type: ZodLiteral<"tool"> },
                "strip",
                ZodTypeAny,
                { name: string; type: "tool" },
                { name: string; type: "tool" },
            >,
            ZodObject<
                { type: ZodLiteral<"auto"> },
                "strip",
                ZodTypeAny,
                { type: "auto" },
                { type: "auto" },
            >,
            ZodObject<
                { type: ZodLiteral<"any"> },
                "strip",
                ZodTypeAny,
                { type: "any" },
                { type: "any" },
            >,
        ],
    >,

        | "none"
        | "auto"
        | "required"
        | { function: { name: string }; type: "function" },
    { name: string; type: "tool" } | { type: "auto" } | { type: "any" },
> = ...

Parse incoming object as an Anthropic tool choice and immediately convert to OpenAI format