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.

17 lines (16 loc) • 558 B
/** * The operation-level outcome of a UI message stream. * * This is separate from model finish reasons and individual stream chunks. * Fatal stream-processing failures override outcomes declared by the stream * owner. * * Consumer cancellation before an outcome is declared keeps the `unknown` * status and is reported separately through the end callback's `isCancelled` * property. */ export type UIMessageStreamOutcome = | { status: 'completed' } | { status: 'failed'; error?: unknown } | { status: 'aborted' } | { status: 'unknown' };