vercel/ai · error · AISDKError

Transcription request timed out after 60 seconds

Error message

Transcription request timed out after 60 seconds

What it means

The fal transcription model polls fal.ai's queue API for a transcription result; if the elapsed time since the request started exceeds the configured timeout (default 60 seconds), it throws an AISDKError named 'TranscriptionRequestTimedOut'. This is thrown inside doGenerate after a response iteration/step completes but the job still isn't done within the deadline.

Solutions

  1. Increase the timeout option on the fal transcription model configuration (raise timeoutMs above the audio's expected processing time)
  2. Retry the transcription; fal queue delays are often transient
  3. Chunk long audio into smaller segments so each request finishes within the timeout
  4. Verify the fal model/endpoint is healthy and check fal.ai status for incidents

Example fix

// before
const falProvider = createFal({ credentials: key });
await falProvider.transcription.model('whisper-large').doGenerate({ ... });
// after
const falProvider = createFal({ credentials: key });
const model = falProvider.transcription.model('whisper-large', { timeoutMs: 300_000 });
await model.doGenerate({ ... });
Defensive patterns

Strategy: retry

Validate before calling

// before calling: estimate processing time from audio duration
const durationSeconds = getAudioDurationSeconds(audio);
const expectedTimeoutMs = Math.max(60_000, durationSeconds * 10_000);
if (expectedTimeoutMs > 60_000) configureModelWithHigherTimeout(expectedTimeoutMs);

Type guard

function isTranscriptionTimeout(e: unknown): boolean {
  return AISDKError.isInstance(e) && e.name === 'TranscriptionRequestTimedOut';
}

Try / catch

try {
  return await transcriptionModel.doGenerate(options);
} catch (e) {
  if (AISDKError.isInstance(e) && e.name === 'TranscriptionRequestTimedOut') {
    return retryWithBackoff(() => transcriptionModel.doGenerate(options));
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling `fal.transcription(...)` / `transcriptionModel.doGenerate` on a long audio file where fal's queue takes more than timeoutMs (default 60s) to finish processing; slow fal queue throughput for the chosen model.

Common situations: Transcribing long audio files (podcasts, hour-long recordings); transient fal.ai slowness or high queue load; large files uploaded without increasing the timeout option.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


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

Appendix: source

Thrown at packages/fal/src/fal-transcription-model.ts:200

        responseHeaders = statusHeaders;
        rawResponse = statusRawResponse;
        break;
      } catch (error) {
        // If the error message indicates the request is still in progress, ignore it and continue polling
        if (
          error instanceof Error &&
          error.message === 'Request is still in progress'
        ) {
          // Continue with the polling loop
        } else {
          // Re-throw any other errors
          throw error;
        }
      }

      // Check if we've exceeded the timeout
      if (Date.now() - startTime > timeoutMs) {
        throw new AISDKError({
          message: 'Transcription request timed out after 60 seconds',
          name: 'TranscriptionRequestTimedOut',
          cause: response,
        });
      }

      // Wait before polling again
      await delay(pollIntervalMs);
    }

    return {
      text: response.text,
      segments:
        response.chunks?.map(chunk => ({
          text: chunk.text,
          startSecond: chunk.timestamp?.at(0) ?? 0,
          endSecond: chunk.timestamp?.at(1) ?? 0,
        })) ?? [],

View on GitHub (pinned to 69428b1f8b)