Variable openAIToolDefinitionToVercelAIConst
openAIToolDefinitionToVercelAI: ZodPipe<
ZodObject<
{
function: ZodObject<
{
description: ZodOptional<ZodString>;
name: ZodString;
parameters: ZodObject<
{
additionalProperties: ZodOptional<ZodBoolean>;
properties: ZodRecord<
ZodString,
ZodUnion<
readonly [ZodObject<(...), (...)>, ZodObject<(...), (...)>],
>,
>;
required: ZodOptional<ZodArray<ZodString>>;
strict: ZodOptional<ZodBoolean>;
type: ZodLiteral<"object">;
},
$loose,
>;
},
$loose,
>;
type: ZodLiteral<"function">;
},
$loose,
>,
ZodTransform<
{
description?: string;
inputSchema: {
_type: unknown;
jsonSchema?: Record<string, unknown>;
validate: unknown;
};
type: "function";
},
{
function: {
description?: string;
name: string;
parameters: {
additionalProperties?: boolean;
properties: Record<
string,
| {
description?: string;
enum?: string[];
type: | "string"
| "number"
| "boolean"
| "object"
| "null"
| "array"
| "integer";
[key: string]: unknown;
}
| {
anyOf: {
description?: (...)
| (...);
enum?: (...) | (...);
type: (...) | (...) | (...) | (...) | (...) | (...) | (...);
[key: string]: unknown;
}[];
},
>;
required?: string[];
strict?: boolean;
type: "object";
[key: string]: unknown;
};
[key: string]: unknown;
};
type: "function";
[key: string]: unknown;
},
>,
> = ...
Parse incoming object as an OpenAI tool definition and immediately convert to Vercel AI format