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.

26 lines (17 loc) 529 B
--- title: AI_TypeValidationError description: Learn how to fix AI_TypeValidationError --- # AI_TypeValidationError This error occurs when type validation fails. ## Properties - `value`: The value that failed validation - `cause`: The underlying validation error (required in constructor) ## Checking for this Error You can check if an error is an instance of `AI_TypeValidationError` using: ```typescript import { TypeValidationError } from 'ai'; if (TypeValidationError.isInstance(error)) { // Handle the error } ```