vercel/ai · error · InvalidArgumentError
Google batch "${options.batchId}" is not complete.
Error message
Google batch "${options.batchId}" is not complete. What it means
Error "Google batch "${options.batchId}" is not complete." thrown in vercel/ai.
Source
Thrown at packages/google/src/google-batch.ts:357
...convertGoogleBatchStatus(operation),
warnings,
};
}
async experimental_doGetBatchStatus(
options: BatchV4OperationOptions,
): Promise<BatchV4Status> {
return convertGoogleBatchStatus(await this.retrieveBatch(options));
}
async experimental_doGetBatchResults(
options: BatchV4OperationOptions,
): Promise<ReadableStream<BatchV4ItemResult<LanguageModelV4GenerateResult>>> {
const operation = await this.retrieveBatch(options);
const batchStatus = convertGoogleBatchStatus(operation);
if (batchStatus.status === 'pending') {
throw new InvalidArgumentError({
argument: 'batchId',
message: `Google batch "${options.batchId}" is not complete.`,
});
}
const inlinedResponses =
operation.metadata?.output?.inlinedResponses?.inlinedResponses ??
operation.response?.inlinedResponses?.inlinedResponses;
if (inlinedResponses != null) {
return convertAsyncIteratorToReadableStream(
this.iterateBatchResults(
inlinedResponses.map(result => ({
key: result.metadata.key,
response: result.response,
error: result.error,
})),
),View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/google/src/google-batch.ts:357 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/611709f7a2e0d0cf.
Report an issue: GitHub.