{"record":{"id":"b41e7029315971d5","repo":"vercel/ai","slug":"streaming-transcription-with-this-modelid-b41e70","errorCode":null,"errorMessage":"streaming transcription with ${this.modelId}","messagePattern":"streaming transcription with (.+?)","errorType":"exception","errorClass":"UnsupportedFunctionalityError","httpStatus":null,"severity":"error","filePath":"packages/openai/src/transcription/openai-transcription-model.ts","lineNumber":305,"sourceCode":"      language,\n      durationInSeconds: response.duration ?? 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: OpenAITranscriptionStreamOptions,\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 openAIOptions = await parseProviderOptions({\n      provider: 'openai',\n      providerOptions: options.providerOptions,\n      schema: openAITranscriptionModelOptions,\n    });\n    const warnings: SharedV4Warning[] = [];\n\n    // options that only apply to the REST transcription endpoint\n    // (checked on the raw options because some have schema defaults):\n    const rawOpenAIOptions = options.providerOptions?.openai ?? {};\n    for (const option of [\n      'include',\n      'prompt',","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/openai/src/transcription/openai-transcription-model.ts#L287-L323","documentation":"The mirror case of error 805: non-realtime transcription models are served by the REST transcription endpoint and cannot be streamed. doStream checks isRealtimeTranscriptionModelId and throws UnsupportedFunctionalityError when the model id is not a realtime transcription model, since streaming output only exists for realtime models.","triggerScenarios":"Calling streamTranscribe/doStream on OpenAITranscriptionModel with a non-realtime model id such as 'whisper-1' or 'gpt-4o-transcribe'.","commonSituations":"Assuming all transcription models support streaming; copying a streaming example and changing only the model id to a REST-only model; generic abstraction layers that always call doStream.","solutions":["Use a realtime transcription model id with the streaming API","Use the non-streaming transcribe() API with REST transcription models","Check isRealtimeTranscriptionModelId (or your own branch) before choosing doStream vs doGenerate"],"exampleFix":"// before\nstreamTranscribe({ model: openai.transcription('whisper-1'), audio })\n// after\nconst { text } = await transcribe({ model: openai.transcription('whisper-1'), audio })","handlingStrategy":"type-guard","validationCode":"if (!isRealtimeTranscriptionModelId(modelId)) {\n  // use non-streaming transcribe() instead of streamTranscribe\n}","typeGuard":"function supportsStreamingTranscription(modelId: string): boolean {\n  return isRealtimeTranscriptionModelId(modelId);\n}","tryCatchPattern":"try {\n  result = await streamTranscribe({ model, audio });\n} catch (e) {\n  if (UnsupportedFunctionalityError.isInstance(e) && e.message.includes('streaming transcription')) {\n    // fall back to non-streaming transcribe() for this model\n  } else throw e;\n}","preventionTips":["Only call streamTranscribe with realtime model ids","Centralize model selection so streaming/non-streaming choice is derived from the model id","Add a unit test asserting the call style matches the model family"],"tags":["openai","transcription","streaming","unsupported-functionality","realtime"],"backgroundTag":"realtime-model-streaming-unsupported","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}