vercel/ai · error · Error

Prodia multipart response missing job part

Error message

Prodia multipart response missing job part

What it means

After successfully splitting a multipart Prodia response into parts, the SDK requires one part named "job" carrying the JSON job result (parsed against prodiaJobResultSchema). If no part with content-disposition name="job" exists, the SDK cannot build its result and throws this error. It indicates the provider answered multipart but without the mandatory job metadata part.

Solutions

  1. Inspect the raw response (responseHeaders and, if possible, the body) to see which parts the server actually sent.
  2. Pin/update the @ai-sdk/prodia package to match the Prodia API version you are calling.
  3. If you proxy or record Prodia responses (tests, mocks), regenerate fixtures from a real response including the name="job" part.
  4. Report a suspected API contract change to Prodia support if a real request reproducibly lacks the job part.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const result = await generateText({ model: prodia.language(modelId), ... });
} catch (error) {
  if (error instanceof Error && error.message === 'Prodia multipart response missing job part') {
    // capture raw response for bug report; check API contract/version
  }
  throw error;
}

Prevention

When it happens

Trigger: A Prodia language-model doGenerate call received a valid multipart body (boundary found) but none of its parts had content-disposition name="job" — e.g. the response only contained an "output" part, or the job part used a different/renamed disposition.

Common situations: Prodia API contract change or beta endpoint returning a differently structured multipart payload; a mocking proxy or recorded fixture replaying an incomplete response; intermediary rewriting part headers.

Related errors


AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30). Data as JSON: /api/errors/d767b8ac2ee1ffb7. Report an issue: GitHub.

Appendix: source

Thrown at packages/prodia/src/prodia-language-model.ts:418

          schema: zodSchema(prodiaJobResultSchema),
        });
      } else if (contentDisposition.includes('name="output"')) {
        if (
          partContentType.startsWith('text/') ||
          contentDisposition.includes('.txt')
        ) {
          textContent = new TextDecoder().decode(part.body);
        } else if (partContentType.startsWith('image/')) {
          fileContent.push({
            mediaType: partContentType,
            data: part.body,
          });
        }
      }
    }

    if (!jobResult) {
      throw new Error('Prodia multipart response missing job part');
    }

    return {
      value: { jobResult, textContent, fileContent },
      responseHeaders,
    };
  };
}

View on GitHub (pinned to 69428b1f8b)