{"record":{"id":"b3159ba5e0e9e384","repo":"vercel/ai","slug":"vertex-video-generation-error","errorCode":"VERTEX_VIDEO_GENERATION_ERROR","errorMessage":"No videos in response. Response: ${JSON.stringify(finalOperation)}","messagePattern":"No videos in response\\. Response: (.+?)","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/google-vertex/src/google-vertex-video-model.ts","lineNumber":280,"sourceCode":"    warnings: SharedV4Warning[];\n    currentDate: Date;\n  }): {\n    status: 'completed';\n    videos: Array<\n      | { type: 'base64'; data: string; mediaType: string }\n      | { type: 'url'; url: string; mediaType: string }\n    >;\n    warnings: SharedV4Warning[];\n    providerMetadata: SharedV4ProviderMetadata;\n    response: {\n      timestamp: Date;\n      modelId: string;\n      headers: Record<string, string> | undefined;\n    };\n  } {\n    const response = finalOperation.response;\n    if (!response?.videos || response.videos.length === 0) {\n      throw new AISDKError({\n        name: 'VERTEX_VIDEO_GENERATION_ERROR',\n        message: `No videos in response. Response: ${JSON.stringify(finalOperation)}`,\n      });\n    }\n\n    const videos: Array<\n      | { type: 'base64'; data: string; mediaType: string }\n      | { type: 'url'; url: string; mediaType: string }\n    > = [];\n    const videoMetadata: Array<{\n      gcsUri?: string | null | undefined;\n      mimeType?: string | null | undefined;\n    }> = [];\n\n    for (const video of response.videos) {\n      if (video.bytesBase64Encoded) {\n        videos.push({\n          type: 'base64',","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/google-vertex/src/google-vertex-video-model.ts#L262-L298","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"import { AISDKError } from 'ai';\ntry {\n  const result = await generateVideo({ model: vertex.video('veo-3.0-generate-001'), prompt });\n} catch (e) {\n  if (AISDKError.isInstance(e) && e.name === 'VERTEX_VIDEO_GENERATION_ERROR' && e.message.includes('No videos in response')) {\n    // inspect operation payload for safety-filter reasons, adjust prompt, retry\n  } else throw e;\n}","preventionTips":["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."],"tags":["video-generation","google-vertex","empty-response","api-error"],"backgroundTag":"empty-api-response","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}