{"record":{"id":"c928c573de48274f","repo":"vercel/ai","slug":"streaming-transcription-with-this-modelid","errorCode":null,"errorMessage":"streaming transcription with ${this.modelId}","messagePattern":"streaming transcription with (.+?)","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/elevenlabs/src/elevenlabs-transcription-model.ts","lineNumber":238,"sourceCode":"      language: response.language_code,\n      durationInSeconds: response.words?.at(-1)?.end ?? undefined,\n      warnings,\n      response: {\n        timestamp: currentDate,\n        modelId: this.modelId,\n        headers: responseHeaders,\n        body: rawResponse,\n      },\n    };\n  }\n\n  async doStream(\n    options: TranscriptionModelV4StreamOptions,\n  ): Promise<\n    Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>\n  > {\n    if (!isRealtimeTranscriptionModelId(this.modelId)) {\n      throw new UnsupportedFunctionalityError({\n        functionality: `streaming transcription with ${this.modelId}`,\n      });\n    }\n\n    const currentDate = this.config._internal?.currentDate?.() ?? new Date();\n    const elevenLabsOptions = await parseProviderOptions({\n      provider: 'elevenlabs',\n      providerOptions: options.providerOptions,\n      schema: elevenLabsTranscriptionModelOptionsSchema,\n    });\n    const streamingOptions = elevenLabsOptions?.streaming ?? undefined;\n    const warnings: SharedV4Warning[] = [];\n\n    const rawElevenLabsOptions = options.providerOptions?.elevenlabs ?? {};\n    for (const option of [\n      'diarize',\n      'fileFormat',\n      'numSpeakers',","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/elevenlabs/src/elevenlabs-transcription-model.ts#L220-L256","documentation":"The ElevenLabs transcription model throws this when doStream is called with a model ID that is NOT a realtime transcription model. Batch models like scribe_v1 only support one-shot HTTP transcription and have no realtime WebSocket streaming endpoint.","triggerScenarios":"Calling doStream with elevenlabs.transcriptionModel('scribe_v1') or any non-realtime model id where isRealtimeTranscriptionModelId returns false.","commonSituations":"Developers assume all transcription models support streaming, or they refactor code from batch to streaming without changing the model id.","solutions":["Use a realtime model id such as 'scribe_v1_realtime' for streaming transcription.","For batch models, use doGenerate instead of doStream.","Verify the model id supports realtime streaming before calling doStream."],"exampleFix":"// before\nconst model = elevenlabs.transcriptionModel('scribe_v1');\nawait model.doStream(options);\n// after\nconst model = elevenlabs.transcriptionModel('scribe_v1_realtime');\nawait model.doStream(options);","handlingStrategy":"validation","validationCode":"function assertRealtimeModel(modelId: string) {\n  if (!modelId.includes('realtime')) {\n    throw new Error(`${modelId} does not support streaming transcription; use doGenerate`);\n  }\n}\nassertRealtimeModel('scribe_v1_realtime');","typeGuard":"function isBatchModelId(modelId: string): boolean {\n  return !modelId.includes('realtime');\n}","tryCatchPattern":null,"preventionTips":["Only call doStream on models explicitly documented as realtime.","Encode model capabilities in a lookup table next to model ids.","Add an integration test per model id x call-path combination."],"tags":["elevenlabs","transcription","streaming","unsupported-functionality"],"backgroundTag":"unsupported-model-functionality","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}