vercel/ai · error · UnsupportedFunctionalityError

streaming transcription with ${this.modelId}

Error message

streaming transcription with ${this.modelId}

What it means

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.

Source

Thrown at packages/elevenlabs/src/elevenlabs-transcription-model.ts:238

      language: response.language_code,
      durationInSeconds: response.words?.at(-1)?.end ?? undefined,
      warnings,
      response: {
        timestamp: currentDate,
        modelId: this.modelId,
        headers: responseHeaders,
        body: rawResponse,
      },
    };
  }

  async doStream(
    options: TranscriptionModelV4StreamOptions,
  ): Promise<
    Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>
  > {
    if (!isRealtimeTranscriptionModelId(this.modelId)) {
      throw new UnsupportedFunctionalityError({
        functionality: `streaming transcription with ${this.modelId}`,
      });
    }

    const currentDate = this.config._internal?.currentDate?.() ?? new Date();
    const elevenLabsOptions = await parseProviderOptions({
      provider: 'elevenlabs',
      providerOptions: options.providerOptions,
      schema: elevenLabsTranscriptionModelOptionsSchema,
    });
    const streamingOptions = elevenLabsOptions?.streaming ?? undefined;
    const warnings: SharedV4Warning[] = [];

    const rawElevenLabsOptions = options.providerOptions?.elevenlabs ?? {};
    for (const option of [
      'diarize',
      'fileFormat',
      'numSpeakers',

View on GitHub (pinned to 69428b1f8b)

Solutions

  1. Use a realtime model id such as 'scribe_v1_realtime' for streaming transcription.
  2. For batch models, use doGenerate instead of doStream.
  3. Verify the model id supports realtime streaming before calling doStream.

Example fix

// before
const model = elevenlabs.transcriptionModel('scribe_v1');
await model.doStream(options);
// after
const model = elevenlabs.transcriptionModel('scribe_v1_realtime');
await model.doStream(options);
Defensive patterns

Strategy: validation

Validate before calling

function assertRealtimeModel(modelId: string) {
  if (!modelId.includes('realtime')) {
    throw new Error(`${modelId} does not support streaming transcription; use doGenerate`);
  }
}
assertRealtimeModel('scribe_v1_realtime');

Type guard

function isBatchModelId(modelId: string): boolean {
  return !modelId.includes('realtime');
}

Prevention

When it happens

Trigger: Calling doStream with elevenlabs.transcriptionModel('scribe_v1') or any non-realtime model id where isRealtimeTranscriptionModelId returns false.

Common situations: Developers assume all transcription models support streaming, or they refactor code from batch to streaming without changing the model id.

Related errors


AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30). Data as JSON: /api/errors/c928c573de48274f. Report an issue: GitHub.