UNPKG

ai

Version:

AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.

16 lines (13 loc) 374 B
import { JSONValue as OriginalJSONValue } from '@ai-sdk/provider'; import { z } from 'zod/v4'; export const jsonValueSchema: z.ZodType<JSONValue> = z.lazy(() => z.union([ z.null(), z.string(), z.number(), z.boolean(), z.record(z.string(), jsonValueSchema.optional()), z.array(jsonValueSchema), ]), ); export type JSONValue = OriginalJSONValue;