vercel/ai · error · InvalidArgumentError

Anthropic batch "${options.batchId}" is not complete.

Error message

Anthropic batch "${options.batchId}" is not complete.

What it means

Error "Anthropic batch "${options.batchId}" is not complete." thrown in vercel/ai.

Source

Thrown at packages/anthropic/src/anthropic-messages-batch.ts:298

      batchId: batch.id,
      ...convertAnthropicBatchStatus(batch),
      warnings: batchWarnings,
    };
  }

  async experimental_doGetBatchStatus(
    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.`,
      });
    }

View on GitHub (pinned to 69428b1f8b)

When it happens

Trigger: Thrown at packages/anthropic/src/anthropic-messages-batch.ts:298 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/9b5b2713c23a90a3. Report an issue: GitHub.