{"record":{"id":"0430458efc38e480","repo":"vercel/ai","slug":"non-streaming-transcription-with-this-modelid","errorCode":null,"errorMessage":"non-streaming transcription with ${this.modelId}","messagePattern":"non-streaming transcription with (.+?)","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/elevenlabs/src/elevenlabs-transcription-model.ts","lineNumber":185,"sourceCode":"            key as keyof ElevenLabsTranscriptionAPITypes\n          ];\n        if (value !== undefined) {\n          formData.append(key, String(value));\n        }\n      }\n    }\n\n    return {\n      formData,\n      warnings,\n    };\n  }\n\n  async doGenerate(\n    options: Parameters<TranscriptionModelV4['doGenerate']>[0],\n  ): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>> {\n    if (isRealtimeTranscriptionModelId(this.modelId)) {\n      throw new UnsupportedFunctionalityError({\n        functionality: `non-streaming transcription with ${this.modelId}`,\n      });\n    }\n\n    const currentDate = this.config._internal?.currentDate?.() ?? new Date();\n    const { formData, warnings } = await this.getArgs(options);\n\n    const {\n      value: response,\n      responseHeaders,\n      rawValue: rawResponse,\n    } = await postFormDataToApi({\n      url: this.config.url({\n        path: '/v1/speech-to-text',\n        modelId: this.modelId,\n      }),\n      headers: combineHeaders(this.config.headers?.(), options.headers),\n      formData,","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/elevenlabs/src/elevenlabs-transcription-model.ts#L167-L203","documentation":"The ElevenLabs transcription model throws this when doGenerate (non-streaming transcription) is called with a model ID that is a realtime-only transcription model (per isRealtimeTranscriptionModelId). Realtime models like scribe_v1_realtime only support WebSocket streaming; they cannot be used for one-shot HTTP transcription.","triggerScenarios":"Calling generateText/transcribe-style doGenerate with providerOptions selecting a realtime model id such as 'scribe_v1_realtime' through elevenlabs.transcriptionModel('scribe_v1_realtime').","commonSituations":"Developers copy a realtime model id from ElevenLabs docs into a non-streaming transcription call, or dynamically switch model ids and accidentally route a realtime model into the batch transcription path.","solutions":["Use a batch/non-realtime model id such as 'scribe_v1' for non-streaming transcription.","If you need realtime results, use doStream with the realtime model instead of doGenerate.","Check the model id with isRealtimeTranscriptionModelId-style logic before choosing the call path."],"exampleFix":"// before\nconst model = elevenlabs.transcriptionModel('scribe_v1_realtime');\nawait model.doGenerate(options);\n// after\nconst model = elevenlabs.transcriptionModel('scribe_v1');\nawait model.doGenerate(options);","handlingStrategy":"validation","validationCode":"const REALTIME_IDS = ['scribe_v1_realtime'];\nfunction assertBatchModel(modelId: string) {\n  if (REALTIME_IDS.some(id => modelId.includes(id))) {\n    throw new Error(`${modelId} only supports streaming transcription`);\n  }\n}\nassertBatchModel('scribe_v1'); // before calling doGenerate","typeGuard":"function isRealtimeModelId(modelId: string): boolean {\n  return modelId.includes('realtime');\n}","tryCatchPattern":null,"preventionTips":["Keep separate factory helpers for batch vs realtime model ids.","Centralize model id selection in one config module with capability flags.","Read the ElevenLabs model docs before switching model ids."],"tags":["elevenlabs","transcription","unsupported-functionality","model-selection"],"backgroundTag":"unsupported-model-functionality","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}