vercel/ai · error · InvalidArgumentError
Anthropic batch "${options.batchId}" results are no longer a
Error message
Anthropic batch "${options.batchId}" results are no longer available. What it means
Error "Anthropic batch "${options.batchId}" results are no longer available." thrown in vercel/ai.
Source
Thrown at packages/anthropic/src/anthropic-messages-batch.ts:305
options: BatchV4OperationOptions,
): Promise<BatchV4Status> {
return convertAnthropicBatchStatus(await this.retrieveBatch(options));
}
async experimental_doGetBatchResults(
options: BatchV4OperationOptions,
): Promise<ReadableStream<BatchV4ItemResult<LanguageModelV4GenerateResult>>> {
const batch = await this.retrieveBatch(options);
if (convertAnthropicBatchStatus(batch).status === 'pending') {
throw new InvalidArgumentError({
argument: 'batchId',
message: `Anthropic batch "${options.batchId}" is not complete.`,
});
}
if (batch.archived_at != null) {
throw new InvalidArgumentError({
argument: 'batchId',
message: `Anthropic batch "${options.batchId}" results are no longer available.`,
});
}
if (batch.results_url == null) {
throw new InvalidResponseDataError({
data: batch,
message: `Anthropic batch "${options.batchId}" completed without batch output.`,
});
}
const { value: lines } = await getFromApi({
url: batch.results_url,
validateUrl: true,
credentialedOrigin: this.config.baseURL,
trustedOrigin: this.config.baseURL,
headers: await this.getBatchHeaders(options.headers),View on GitHub (pinned to 69428b1f8b)
When it happens
Trigger: Thrown at packages/anthropic/src/anthropic-messages-batch.ts:305 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/0746f76e4a50c05d.
Report an issue: GitHub.