vercel/ai · error · APICallError
Failed to parse video SSE event
Error message
Failed to parse video SSE event
What it means
Error "Failed to parse video SSE event" thrown in vercel/ai.
Source
Thrown at packages/gateway/src/gateway-video-model.ts:109
stream: response.body,
schema: gatewayVideoEventSchema,
});
const reader = eventStream.getReader();
const { done, value: parseResult } = await reader.read();
reader.releaseLock();
if (done || !parseResult) {
throw new APICallError({
message: 'SSE stream ended without a data event',
url,
requestBodyValues,
statusCode: response.status,
});
}
if (!parseResult.success) {
throw new APICallError({
message: 'Failed to parse video SSE event',
cause: parseResult.error,
url,
requestBodyValues,
statusCode: response.status,
});
}
const event = parseResult.value;
if (event.type === 'error') {
throw new APICallError({
message: event.message,
statusCode: event.statusCode,
url,
requestBodyValues,
responseHeaders: Object.fromEntries([...response.headers]),
responseBody: JSON.stringify(event),View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/gateway/src/gateway-video-model.ts:109 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/68d8bfe780e98823.
Report an issue: GitHub.