vercel/ai · error · AISDKError
TranscriptionJobPollingTimedOut
TranscriptionJobPollingTimedOut
Error message
Transcription job polling timed out
What it means
doGenerate polls Rev.ai's job status every 1000ms until it becomes 'transcribed'; if the elapsed time exceeds timeoutMs, this error is thrown. It means Rev.ai did not finish transcribing within the configured timeout. The last known job response is attached as cause.
Solutions
- Increase the transcription model's polling timeout option to cover long audio durations
- Inspect the job via error.cause and Rev.ai's dashboard to see whether it completed later
- Check Rev.ai status/incidents for outages
- Retry the job; if consistently stuck, contact Rev.ai support with the job id
Example fix
// before
const model = revai.transcriptionModel('general');
// after
const model = revai.transcriptionModel('general', { pollTimeoutMs: 15 * 60 * 1000 }); Defensive patterns
Strategy: retry
Validate before calling
// estimate: ensure timeout exceeds expected transcription time
const expectedMs = (audioDurationSeconds / 60) * 15000; // rough budget
if (timeoutMs < expectedMs) console.warn('Polling timeout likely too short for audio length'); Type guard
function isPollingTimeout(e) {
return typeof e === 'object' && e !== null && e.name === 'TranscriptionJobPollingTimedOut';
} Try / catch
try {
result = await model.doGenerate(options);
} catch (e) {
if (e.name === 'TranscriptionJobPollingTimedOut') {
result = await pollJobDirectly(e.cause.jobId); // resume polling with longer budget
} else throw e;
} Prevention
- Set a polling timeout proportional to audio duration
- Check Rev.ai incident status before long jobs
- Persist the job id (from e.cause) so you can resume instead of re-uploading
When it happens
Trigger: Polling loop runs longer than timeoutMs (default configured on the model) because the audio file is very long, Rev.ai is slow/backlogged, or the job is stuck in a non-terminal state.
Common situations: Transcribing hours-long audio with the default short timeout; Rev.ai service degradation; a job that permanently stalls (polling loop keeps hitting the timeout check).
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Black Forest Labs generation timed out.
- BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT
- Fireworks image generation timed out after
- google.interactions: timed out polling interaction
- Image generation timed out after
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/ff96344cee3baf49.
Report an issue: GitHub.
Appendix: source
Thrown at packages/revai/src/revai-transcription-model.ts:177
if (submissionResponse.status === 'failed') {
throw new AISDKError({
message: 'Failed to submit transcription job to Rev.ai',
name: 'TranscriptionJobSubmissionFailed',
cause: submissionResponse,
});
}
const jobId = submissionResponse.id;
const timeoutMs = 60 * 1000; // 60 seconds timeout
const startTime = Date.now();
const pollingInterval = 1000;
let jobResponse = submissionResponse;
while (jobResponse.status !== 'transcribed') {
// Check if we've exceeded the timeout
if (Date.now() - startTime > timeoutMs) {
throw new AISDKError({
message: 'Transcription job polling timed out',
name: 'TranscriptionJobPollingTimedOut',
cause: submissionResponse,
});
}
// Poll for job status
const pollingResult = await getFromApi({
url: this.config.url({
path: `/speechtotext/v1/jobs/${jobId}`,
modelId: this.modelId,
}),
validateUrl: false,
headers: combineHeaders(this.config.headers?.(), options.headers),
failedResponseHandler: revaiFailedResponseHandler,
successfulResponseHandler: createJsonResponseHandler(
revaiTranscriptionJobResponseSchema,
),View on GitHub (pinned to 69428b1f8b)