vercel/ai · error · AISDKError
ALIBABA_VIDEO_GENERATION_ERROR
ALIBABA_VIDEO_GENERATION_ERROR
Error message
No video URL in response. Task ID: ${taskId} What it means
After video generation completes, the provider polls the task status. If the completed status response lacks output.video_url, buildCompletedResult throws an ALIBABA_VIDEO_GENERATION_ERROR because there is no result to return. This indicates an unexpected response shape from DashScope despite a 'succeeded' task status.
Source
Thrown at packages/alibaba/src/alibaba-video-model.ts:545
responseHeaders: Record<string, string> | undefined,
warnings: SharedV4Warning[],
currentDate: Date,
): {
status: 'completed';
videos: Array<{ type: 'url'; url: string; mediaType: string }>;
warnings: SharedV4Warning[];
providerMetadata: SharedV4ProviderMetadata;
response: {
timestamp: Date;
modelId: string;
headers: Record<string, string> | undefined;
};
} {
const taskId = statusResponse.output?.task_id;
const videoUrl = statusResponse.output?.video_url;
if (!videoUrl) {
throw new AISDKError({
name: 'ALIBABA_VIDEO_GENERATION_ERROR',
message: `No video URL in response. Task ID: ${taskId}`,
});
}
return {
status: 'completed',
videos: [
{
type: 'url',
url: videoUrl,
mediaType: 'video/mp4',
},
],
warnings,
response: {
timestamp: currentDate,
modelId: this.modelId,View on GitHub (pinned to 69428b1f8b)
Solutions
- Log the full statusResponse to inspect actual output fields
- Verify the model ID and API version produce video_url on completion (e.g. wan2.2-t2i vs wan endpoints)
- Retry the generation task; if persistent, report the raw response to the provider/SDK issue tracker
Defensive patterns
Strategy: retry
Validate before calling
// Cannot validate before call; validate after polling completes: if (status.output?.task_status === 'succeeded' && !status.output?.video_url) retryOrFail();
Type guard
function hasVideoUrl(r: unknown): r is { output: { video_url: string; task_id: string } } {
return !!(r as any)?.output?.video_url;
} Try / catch
try {
result = await generateVideo({ model, prompt });
} catch (e) {
if (AISDKError.isInstance(e) && e.name === 'ALIBABA_VIDEO_GENERATION_ERROR') {
// inspect status response, optionally re-poll or resubmit task
}
} Prevention
- Poll to a terminal status before treating a task as complete
- Log the raw status JSON for debugging unexpected shapes
- Track DashScope API changelog for response schema changes
When it happens
Trigger: Polling a completed Wan video task via doStatus where statusResponse.output.task_id exists but output.video_url is missing or named differently (API change, partial response).
Common situations: DashScope API shape changes, region/account configurations returning different fields, or task finished with a non-success state the provider misclassified as completed.
Related errors
- BYTEDANCE_VIDEO_GENERATION_ERROR
- FAL_VIDEO_GENERATION_ERROR
- GOOGLE_VIDEO_GENERATION_ERROR
- KLINGAI_VIDEO_GENERATION_ERROR
- MINIMAX_VIDEO_GENERATION_ERROR
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/28f8733f39c808d5.
Report an issue: GitHub.