{"record":{"id":"3a0350b69178ba78","repo":"vercel/ai","slug":"prodia-multipart-response-missing-job-part-3a0350","errorCode":null,"errorMessage":"Prodia multipart response missing job part","messagePattern":"Prodia multipart response missing job part","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/prodia/src/prodia-video-model.ts","lineNumber":222,"sourceCode":"      if (contentDisposition.includes('name=\"job\"')) {\n        const jsonStr = new TextDecoder().decode(part.body);\n        jobResult = await parseJSON({\n          text: jsonStr,\n          schema: zodSchema(prodiaJobResultSchema),\n        });\n      } else if (contentDisposition.includes('name=\"output\"')) {\n        videoBytes = part.body;\n        if (partContentType.startsWith('video/')) {\n          videoMediaType = partContentType;\n        }\n      } else if (partContentType.startsWith('video/')) {\n        videoBytes = part.body;\n        videoMediaType = partContentType;\n      }\n    }\n\n    if (!jobResult) {\n      throw new Error('Prodia multipart response missing job part');\n    }\n    if (!videoBytes) {\n      throw new Error('Prodia multipart response missing output video');\n    }\n\n    return {\n      value: { jobResult, videoBytes, videoMediaType },\n      responseHeaders,\n    };\n  };\n}\n\nasync function resolveVideoFileData(\n  file: NonNullable<\n    Parameters<NonNullable<VideoModelV4['doGenerate']>>[0]['image']\n  >,\n  abortSignal?: AbortSignal,\n): Promise<{ bytes: Uint8Array; mediaType: string }> {","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/prodia/src/prodia-video-model.ts#L204-L240","documentation":"The multipart body was parsed successfully, but no part carried content-disposition name=\"job\" containing the JSON job result. The Prodia video model requires this part to attach job metadata (used in providerMetadata) to its result, so it throws when the job part is absent.","triggerScenarios":"A Prodia video doGenerate call got a well-formed multipart body, but the parts contained only an output video (or unrelated parts) and no name=\"job\" part — e.g. a provider-side format change or a truncated/stale recorded fixture.","commonSituations":"Prodia video API contract change on beta endpoints; mocked/test fixtures recorded from an older response shape; middleware mangling content-disposition headers of parts.","solutions":["Capture and inspect the raw multipart body (parts and their content-disposition headers) to confirm the job part is genuinely missing.","Update @ai-sdk/prodia to the latest version so parsing matches the current Prodia response format.","Regenerate any mocked or recorded fixtures from a fresh real Prodia response.","Contact Prodia support if a genuine request reproducibly omits the job part."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const video = await generateVideo({ model: prodia.video(modelId), ... });\n} catch (error) {\n  if (error instanceof Error && error.message === 'Prodia multipart response missing job part') {\n    // record raw multipart parts; likely provider format change or stale fixture\n  }\n  throw error;\n}","preventionTips":["Use the latest @ai-sdk/prodia release.","Refresh test fixtures from live API captures regularly.","Do not mutate part headers (content-disposition) in proxies.","Verify against a direct Prodia call when the SDK errors."],"tags":["network","multipart","video","provider-response","prodia"],"backgroundTag":"malformed-multipart-response","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}