Skip to content

schema: classify transcription models + add gpt-transcribe + audio media types - #1121

Open
paultancre-bt wants to merge 2 commits into
mainfrom
paultancre/transcription-catalog
Open

schema: classify transcription models + add gpt-transcribe + audio media types#1121
paultancre-bt wants to merge 2 commits into
mainfrom
paultancre/transcription-catalog

Conversation

@paultancre-bt

@paultancre-bt paultancre-bt commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Catalog support for speech-to-text transcription models. Paired with the braintrust main-repo branch paultancre/transcription-endpoint (gateway /v1/audio/transcriptions endpoint + playground support). Tracked in GATE-30.

Changes

  • Additive optional transcription: boolean on ModelSchema (backwards compatible; avoids widening the closed flavor enum, which would break older deployed proxies/SDKs).
  • Flag all speech-to-text models (gpt-4o-transcribe family, whisper-1, fireworks whisper) and add the missing gpt-transcribe (per-minute priced, so no per-token cost fields — noted in GATE-30).
  • getSupportedMediaTypes/isMediaTypeSupported include audio when the model is transcription, and widen the model param to string. AUDIO_MEDIA_TYPES expanded to OpenAI's full set: wav, mp3, mpeg, mp4, webm, flac, ogg, m4a.

ref - https://github.com/braintrustdata/braintrust/pull/19029

paultancre-bt and others added 2 commits August 17, 2026 16:34
Add an additive optional `transcription` flag to ModelSchema (backwards
compatible; avoids widening the closed `flavor` enum which would break older
consumers). Flag all speech-to-text models (gpt-4o-transcribe family, whisper-1,
fireworks whisper) so the app can keep them out of the chat playground picker
and, later, surface them in a dedicated transcription UI.

Also add the missing `gpt-transcribe` model. It is priced per-minute with no
per-token pricing, which the current token-only schema can't represent, so no
cost fields are set (per-minute cost is deferred; tracked in GATE-30).

Pairs with the gateway /v1/audio/transcriptions endpoint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
getSupportedMediaTypes now includes audio types when the model is flagged
`transcription`, so the playground file picker allows audio uploads for
gpt-4o-transcribe etc. Widen the `model` params to string (ModelName is a
subtype) so callers can pass the resolved model name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview Aug 18, 2026 8:38am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fedd1984c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Comment on lines +155 to +157
// Transcription models take an audio file regardless of provider format.
if (model && getAvailableModels()[model]?.transcription) {
Object.assign(baseSupport, toMediaTypeSupport(AUDIO_MEDIA_TYPES));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move transcription upload shaping to the gateway

This model-aware media filtering determines which files the transcription request path accepts, so it is request/upload shaping in the deprecated proxy. The root AGENTS.md assigns that behavior to the parent gateway/ implementation and permits only the catalog JSON exception here; keeping active behavior in this package risks the gateway and deprecated proxy diverging. Move this logic to the paired gateway change and retain only the catalog update here.

AGENTS.md reference: AGENTS.md:L6-L15

Useful? React with 👍 / 👎.

Comment on lines +155 to +157
// Transcription models take an audio file regardless of provider format.
if (model && getAvailableModels()[model]?.transcription) {
Object.assign(baseSupport, toMediaTypeSupport(AUDIO_MEDIA_TYPES));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict transcription models to transcription inputs

When a flagged OpenAI transcription model is selected, baseSupport already contains PDFs and images, and this assignment merely adds audio types. Consequently, calls such as getSupportedMediaTypes("openai", "whisper-1") advertise application/pdf and image/jpeg, allowing the upload validator to accept files that the transcription endpoint will reject. In the active gateway implementation, short-circuit to the transcription-specific media set instead of unioning it with the format defaults.

AGENTS.md reference: AGENTS.md:L6-L12

Useful? React with 👍 / 👎.

Comment on lines +155 to +157
// Transcription models take an audio file regardless of provider format.
if (model && getAvailableModels()[model]?.transcription) {
Object.assign(baseSupport, toMediaTypeSupport(AUDIO_MEDIA_TYPES));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept standard MIME types for supported containers

When a browser reports a supported .mp4, .webm, or .mpeg upload using its standard video/mp4, video/webm, or video/mpeg MIME type, this branch merges only AUDIO_MEDIA_TYPES, so the transcription helper rejects the file despite supporting those container formats. The aliases already exist in VIDEO_MEDIA_TYPES; include the applicable container MIME aliases in the transcription-specific set in the active gateway implementation.

AGENTS.md reference: AGENTS.md:L6-L12

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant