Skip to content

support realtime transcription intent#1974

Open
sarptandoven wants to merge 1 commit into
openai:mainfrom
sarptandoven:fix/realtime-transcription-intent
Open

support realtime transcription intent#1974
sarptandoven wants to merge 1 commit into
openai:mainfrom
sarptandoven:fix/realtime-transcription-intent

Conversation

@sarptandoven

Copy link
Copy Markdown

summary

  • adds an optional intent: 'transcription' realtime connection option
  • includes the intent query parameter in stable and beta realtime URLs for OpenAI and Azure deployment connections
  • accepts the same intent option on stable and beta Azure realtime factory helpers

why

  • fixes Support realtime transcription #1511
  • Azure realtime transcription requires intent=transcription, but the SDK only exposed model / deploymentName and callID connection targets
  • callers currently need lower-level URL mutation workarounds to create transcription realtime sessions

validation

  • pnpm exec jest tests/realtime.test.ts --runInBand
  • pnpm exec tsc --noEmit --pretty false
  • git diff --check
  • pnpm lint

@sarptandoven sarptandoven requested a review from a team as a code owner July 6, 2026 19:50
Comment thread src/realtime/internal-base.ts Outdated
} else {
url.searchParams.set('model', config.model!);
if (intent) {
url.searchParams.set('intent', intent);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think this still makes transcription connections fail for the standard OpenAI path. intent only exists on the model variant, so this branch always emits both model and intent=transcription. the realtime API rejects transcription sessions when a model query parameter is present (invalid_model); the documented URL is just ...?intent=transcription, with the transcription model selected in session.update. could we model transcription as a third connection variant that emits intent without model or deployment? thanks!

@sarptandoven sarptandoven force-pushed the fix/realtime-transcription-intent branch from c40d18d to a5b8030 Compare July 7, 2026 00:03
@sarptandoven

Copy link
Copy Markdown
Author

thanks, that was right. i changed this to model transcription as a separate connection variant instead of adding intent to the model/deployment variant.

updated behavior:

  • standard OpenAI transcription now builds ...?intent=transcription, with no model query param
  • Azure transcription builds with intent=transcription and no deployment query param
  • model/deployment and sideband callID connections keep their existing URL shapes
  • model + intent, deploymentName + intent, and callID + intent are rejected instead of silently producing an invalid mixed target

I also updated the realtime tests to cover the intent-only URLs and the invalid mixed-target cases.

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.

Support realtime transcription

2 participants