vercel/ai · error · AISDKError

GOOGLE_FILES_UPLOAD_TIMEOUT

GOOGLE_FILES_UPLOAD_TIMEOUT

Error message

File processing timed out after ${pollTimeoutMs}ms

What it means

Error "File processing timed out after ${pollTimeoutMs}ms" thrown in vercel/ai.

Source

Thrown at packages/google/src/google-files.ts:143

      throw new AISDKError({
        name: 'GOOGLE_FILES_UPLOAD_ERROR',
        message: `Failed to upload file data: ${uploadResponse.status} ${errorBody}`,
      });
    }

    const uploadResult = (await uploadResponse.json()) as {
      file: GoogleFileResource;
    };

    let file = uploadResult.file;

    const pollIntervalMs = googleOptions?.pollIntervalMs ?? 2000;
    const pollTimeoutMs = googleOptions?.pollTimeoutMs ?? 300000;
    const startTime = Date.now();

    while (file.state === 'PROCESSING') {
      if (Date.now() - startTime > pollTimeoutMs) {
        throw new AISDKError({
          name: 'GOOGLE_FILES_UPLOAD_TIMEOUT',
          message: `File processing timed out after ${pollTimeoutMs}ms`,
        });
      }

      await delay(pollIntervalMs);

      const fileNameMatch = /^files\/([^/]+)$/.exec(file.name);
      const filePath =
        fileNameMatch != null
          ? `files/${encodePathSegment(fileNameMatch[1])}`
          : encodePathSegment(file.name);

      const { value: fileStatus } = await getFromApi({
        url: `${this.config.baseURL}/${filePath}`,
        validateUrl: false,
        headers: combineHeaders(resolvedHeaders),
        successfulResponseHandler: createJsonResponseHandler(

View on GitHub (pinned to 69428b1f8b)

When it happens

Trigger: Thrown at packages/google/src/google-files.ts:143 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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