Skip to content

OpenAI audio.transcriptions.create() and audio.speech.create() not instrumented (wrapper and auto-instrumentation) #1629

@braintrust-bot

Description

@braintrust-bot

Summary

The OpenAI Node SDK provides stable audio APIs — audio.transcriptions.create() (Whisper speech-to-text) and audio.speech.create() (TTS text-to-speech) — but neither the wrapper (wrapOpenAI) nor the auto-instrumentation plugin instruments them. Calls to these methods produce no Braintrust spans. These are AI model inference calls (Whisper, TTS-1) that users of voice-enabled AI applications would expect to see traced.

What is missing

  • Wrapper (js/src/wrappers/oai.ts): No proxy for audio resource. Only chat.completions, embeddings, moderations, and responses are wrapped.
  • Auto-instrumentation config (js/src/auto-instrumentations/configs/openai.ts): No config entry for any audio.* methods.
  • Channels (js/src/instrumentation/plugins/openai-channels.ts): No channel definitions for audio APIs.
  • Plugin (js/src/instrumentation/plugins/openai-plugin.ts): No handler for audio calls.

Upstream reference

Braintrust docs status

The Braintrust wrapper docs page broadly mentions tracing "GPT models, embeddings, and other OpenAI APIs" but does not specifically enumerate audio support (unclear).

Precedent in this repo

OpenAI embeddings and moderations — similarly "secondary" model APIs — are instrumented in all three layers:

  • Wrapper: js/src/wrappers/oai.ts
  • Auto-instrumentation config: js/src/auto-instrumentations/configs/openai.ts
  • Plugin: js/src/instrumentation/plugins/openai-plugin.ts

Local files inspected

  • js/src/wrappers/oai.ts
  • js/src/auto-instrumentations/configs/openai.ts
  • js/src/instrumentation/plugins/openai-channels.ts
  • js/src/instrumentation/plugins/openai-plugin.ts
  • js/src/vendor-sdk-types/openai.ts
  • js/src/vendor-sdk-types/openai-common.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions