Skip to content

[bot] Vercel AI SDK experimental_generateSpeech and experimental_transcribe not instrumented #1900

@braintrust-bot

Description

@braintrust-bot

Summary

The Vercel AI SDK (ai package) exports experimental_generateSpeech (text-to-speech) and experimental_transcribe (speech-to-text) as core functions. Neither the wrapper (wrapAISDK) nor the auto-instrumentation plugin instruments them. Calls to these functions produce no Braintrust spans.

Every other AI SDK core execution function — generateText, streamText, generateObject, streamObject, embed, embedMany, rerank, and the Agent class methods — is fully instrumented, making these the only uninstrumented generative execution functions in the AI SDK plugin.

What instrumentation is missing

  • Auto-instrumentation config (js/src/auto-instrumentations/configs/ai-sdk.ts): No config entries for experimental_generateSpeech or experimental_transcribe. Configs exist for 13 other AI SDK functions.
  • Channels (js/src/instrumentation/plugins/ai-sdk-channels.ts): No channel definitions for speech generation or transcription. 14 channels are defined for other functions.
  • Plugin (js/src/instrumentation/plugins/ai-sdk-plugin.ts): No handler for speech or transcription calls.
  • Vendor types (js/src/vendor-sdk-types/ai-sdk-common.ts): AISDKNamespaceBase does not include experimental_generateSpeech or experimental_transcribe.

A grep for generateSpeech or transcribe across js/src/ returns zero matches.

Upstream reference

Both functions are documented core exports of the ai package (v6+):

Function Description Reference
experimental_generateSpeech Converts text to speech audio using a SpeechModelV3. Accepts model, text, voice, outputFormat, instructions, speed, language. Returns generated audio as base64/Uint8Array with media type. https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-speech
experimental_transcribe Generates a text transcript from audio input using a TranscriptionModelV3. Accepts model, audio (string/Uint8Array/ArrayBuffer/URL). Returns transcript text, segments with timing, detected language, and duration. https://ai-sdk.dev/docs/reference/ai-sdk-core/transcribe

Both are imported from 'ai' (the same package instrumented by this repo) and are available in AI SDK v6, which is already instrumented for other functions (ToolLoopAgent.generate, ToolLoopAgent.stream).

Note: Both carry the experimental_ prefix, indicating the API surface may evolve. However, they are documented, functional, and available in the same SDK version that this repo already instruments for other v6-only features.

Braintrust docs status

not_found — The Braintrust AI SDK integration docs do not enumerate specific supported functions. generateSpeech and transcribe are not mentioned.

Precedent in this repo

Local files inspected

  • js/src/auto-instrumentations/configs/ai-sdk.ts — no speech/transcribe configs
  • js/src/instrumentation/plugins/ai-sdk-channels.ts — no speech/transcribe channels
  • js/src/instrumentation/plugins/ai-sdk-plugin.ts — no speech/transcribe handlers
  • js/src/vendor-sdk-types/ai-sdk-common.ts — no speech/transcribe types
  • js/src/wrappers/ai-sdk/ai-sdk.ts — no speech/transcribe wrapping
  • e2e/scenarios/ai-sdk-instrumentation/ — no speech/transcribe test scenarios

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions