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.
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)
Solutions
- Increase the timeout option on the fal transcription model configuration (raise timeoutMs above the audio's expected processing time)
- Retry the transcription; fal queue delays are often transient
- Chunk long audio into smaller segments so each request finishes within the timeout
- 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
- Set timeoutMs proportionally to audio length when configuring the fal transcription model
- Chunk very long audio files into smaller segments before transcribing
- Add retry with backoff for transient fal queue delays
- Monitor fal.ai status for incidents during batch transcription jobs
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
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Video generation timed out after ${timeoutMs}ms.
- BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT
- FAL_VIDEO_GENERATION_ERROR
- claude-code bridge did not complete WebSocket handshake with
- TranscriptionJobSubmissionFailed
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/76f440a31fe43f5e.
Report an issue: GitHub.