vercel/ai · error · AISDKError
VERTEX_VIDEO_GENERATION_ERROR
VERTEX_VIDEO_GENERATION_ERROR
Error message
No videos in response. Response: ${JSON.stringify(finalOperation)} What it means
buildCompletedResult in the Vertex video model throws an AISDKError named VERTEX_VIDEO_GENERATION_ERROR when the finished long-running operation's response contains no `videos` array (missing or empty). It wraps the entire serialized operation in the message so the raw API payload can be inspected.
Source
Thrown at packages/google-vertex/src/google-vertex-video-model.ts:280
warnings: SharedV4Warning[];
currentDate: Date;
}): {
status: 'completed';
videos: Array<
| { type: 'base64'; data: string; mediaType: string }
| { type: 'url'; url: string; mediaType: string }
>;
warnings: SharedV4Warning[];
providerMetadata: SharedV4ProviderMetadata;
response: {
timestamp: Date;
modelId: string;
headers: Record<string, string> | undefined;
};
} {
const response = finalOperation.response;
if (!response?.videos || response.videos.length === 0) {
throw new AISDKError({
name: 'VERTEX_VIDEO_GENERATION_ERROR',
message: `No videos in response. Response: ${JSON.stringify(finalOperation)}`,
});
}
const videos: Array<
| { type: 'base64'; data: string; mediaType: string }
| { type: 'url'; url: string; mediaType: string }
> = [];
const videoMetadata: Array<{
gcsUri?: string | null | undefined;
mimeType?: string | null | undefined;
}> = [];
for (const video of response.videos) {
if (video.bytesBase64Encoded) {
videos.push({
type: 'base64',View on GitHub (pinned to 69428b1f8b)
Solutions
- Inspect the serialized operation in the error message for `raiMediaFilteredReasons` or similar filtering fields and adjust the prompt.
- Retry generation with a modified prompt that avoids safety triggers.
- Upgrade @ai-sdk/google-vertex in case the response schema handling is outdated.
- Check the model/region supports video output before retrying.
Defensive patterns
Strategy: try-catch
Try / catch
import { AISDKError } from 'ai';
try {
const result = await generateVideo({ model: vertex.video('veo-3.0-generate-001'), prompt });
} catch (e) {
if (AISDKError.isInstance(e) && e.name === 'VERTEX_VIDEO_GENERATION_ERROR' && e.message.includes('No videos in response')) {
// inspect operation payload for safety-filter reasons, adjust prompt, retry
} else throw e;
} Prevention
- Check the operation payload for raiMediaFilteredReasons and pre-screen prompts against Veo safety policies.
- Pin and regularly update @ai-sdk/google-vertex to track Veo response-schema changes.
- Verify the chosen region supports video output.
When it happens
Trigger: Polling doStatus for a completed Veo generateVideos operation whose finalOperation.response lacks videos — e.g. the API returned success but filtered out all output (safety/content filtering), or an unexpected response shape after an API change.
Common situations: Veo silently dropping generated video due to prompt safety filters; malformed/empty operation.response from the Vertex API; outdated provider version vs. changed Veo response schema; region where video output is unavailable.
Related errors
- No output generated.
- No video generated.
- ALIBABA_VIDEO_GENERATION_ERROR
- AI_EmptyResponseBodyError
- Amazon Bedrock returned no images. Status: ${response.status
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/b3159ba5e0e9e384.
Report an issue: GitHub.