{"record":{"id":"76f440a31fe43f5e","repo":"vercel/ai","slug":"transcription-request-timed-out-after-60-seconds","errorCode":null,"errorMessage":"Transcription request timed out after 60 seconds","messagePattern":"Transcription request timed out after 60 seconds","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/fal/src/fal-transcription-model.ts","lineNumber":200,"sourceCode":"        responseHeaders = statusHeaders;\n        rawResponse = statusRawResponse;\n        break;\n      } catch (error) {\n        // If the error message indicates the request is still in progress, ignore it and continue polling\n        if (\n          error instanceof Error &&\n          error.message === 'Request is still in progress'\n        ) {\n          // Continue with the polling loop\n        } else {\n          // Re-throw any other errors\n          throw error;\n        }\n      }\n\n      // Check if we've exceeded the timeout\n      if (Date.now() - startTime > timeoutMs) {\n        throw new AISDKError({\n          message: 'Transcription request timed out after 60 seconds',\n          name: 'TranscriptionRequestTimedOut',\n          cause: response,\n        });\n      }\n\n      // Wait before polling again\n      await delay(pollIntervalMs);\n    }\n\n    return {\n      text: response.text,\n      segments:\n        response.chunks?.map(chunk => ({\n          text: chunk.text,\n          startSecond: chunk.timestamp?.at(0) ?? 0,\n          endSecond: chunk.timestamp?.at(1) ?? 0,\n        })) ?? [],","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/fal/src/fal-transcription-model.ts#L182-L218","documentation":"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.","triggerScenarios":"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.","commonSituations":"Transcribing long audio files (podcasts, hour-long recordings); transient fal.ai slowness or high queue load; large files uploaded without increasing the timeout option.","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"],"exampleFix":"// before\nconst falProvider = createFal({ credentials: key });\nawait falProvider.transcription.model('whisper-large').doGenerate({ ... });\n// after\nconst falProvider = createFal({ credentials: key });\nconst model = falProvider.transcription.model('whisper-large', { timeoutMs: 300_000 });\nawait model.doGenerate({ ... });","handlingStrategy":"retry","validationCode":"// before calling: estimate processing time from audio duration\nconst durationSeconds = getAudioDurationSeconds(audio);\nconst expectedTimeoutMs = Math.max(60_000, durationSeconds * 10_000);\nif (expectedTimeoutMs > 60_000) configureModelWithHigherTimeout(expectedTimeoutMs);","typeGuard":"function isTranscriptionTimeout(e: unknown): boolean {\n  return AISDKError.isInstance(e) && e.name === 'TranscriptionRequestTimedOut';\n}","tryCatchPattern":"try {\n  return await transcriptionModel.doGenerate(options);\n} catch (e) {\n  if (AISDKError.isInstance(e) && e.name === 'TranscriptionRequestTimedOut') {\n    return retryWithBackoff(() => transcriptionModel.doGenerate(options));\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["timeout","network","transcription","fal"],"backgroundTag":"request-timeout","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}