Skip to content

feat(assemblyai): add universal-3-6-pro streaming model - #2409

Open
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
incubate-warhead-talon
Open

feat(assemblyai): add universal-3-6-pro streaming model#2409
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
incubate-warhead-talon

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add universal-3-6-pro to the AssemblyAI streaming STT model type and Universal-3 Pro family.
  • Port the missing Pro-family connection/update options used by the source change, including language steering, continuous partials, interruption delay, and default chat-context carryover.
  • Add source-parity model, parameter, connection-default, family-option, and carryover coverage.

Upstream: livekit/agents#7100

Source diff coverage
  • Adapted livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py to plugins/assemblyai/src/models.ts and plugins/assemblyai/src/stt.ts; TypeScript separates the public model union from the STT implementation. Added universal-3-6-pro to the model type and Pro-family behavior, and ported missing target infrastructure required by the source behavior (continuousPartials, interruptionDelay, languageCodes, safe default chat-context carryover). Updated the generated counterpart plugins/assemblyai/etc/agents-plugin-assemblyai.api.md.
  • Adapted tests/test_plugin_assemblyai_stt.py to plugins/assemblyai/src/stt.test.ts; ported model acceptance, Pro-only parameter forwarding, connect-time defaults, family-wide Voice Focus/mode/language-code acceptance, and default chat-context carryover coverage using the target WebSocket test harness.
  • Not applicable: none.

Testing

  • pnpm vitest run plugins/assemblyai (11 passed, 1 credential-dependent skip)
  • pnpm build
  • pnpm --filter @livekit/agents-plugin-assemblyai lint
  • pnpm --filter @livekit/agents-plugin-assemblyai api:check
  • pnpm exec prettier --check "plugins/assemblyai/src/**/*.{ts,tsx,md,json}" ".changeset/wise-cats-stream.md"

A supplemental pnpm lint monorepo run reaches the AssemblyAI task successfully but is blocked by a pre-existing Prettier violation in plugins/inworld/src/tts.ts:43. That unrelated file is not modified here.


Ported from livekit/agents#7100

Original PR description

What

Adds universal-3-6-pro to the AssemblyAI streaming STT plugin as a supported model value.

  • Server-side, universal-3-6-pro is the next Universal-3 Pro release. It is served by its own ASR deployment and shares all Universal-3 Pro behavior: prompt, agent_context, previous_context_n_turns, continuous_partials, interruption_delay, voice_focus / voice_focus_threshold, mode, language_codes, and formatted output. It introduces no new connection or UpdateConfiguration parameters.
  • The plugin change is accordingly small: the new string is added to the speech_model / model Literals and to _U3_PRO_MODELS, so the model gets the Pro-family parameter gating, the family's connect-time defaults (100 ms min/max turn silence unless mode is set, language detection on), and chat-context carryover.
  • universal-3-5-pro remains the default, and the deprecated u3-pro alias is unchanged.

Testing

  • tests/test_plugin_assemblyai_stt.py: new universal-3-6-pro block (accepted as a model, accepts the Pro-only params, connect query names the model and applies the family defaults), and the family-loop tests (voice_focus, mode, language_codes, carryover default) now include it. Full file: 111 passed; ruff and strict mypy clean.
  • Verified against the production AssemblyAI streaming API: a speech_model=universal-3-6-pro connection returns a Begin session message, identical to universal-3-5-pro.

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner September 2, 2026 17:39
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bfef640

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@livekit/agents-plugin-assemblyai Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-anthropic Patch
@livekit/agents-plugin-azure Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-did Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-krisp Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-perplexity Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-protoface Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-soniox Patch
@livekit/agents-plugin-tavus Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 3 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment on lines +398 to +403
if (opts.continuousPartials !== undefined) {
configMsg.continuous_partials = opts.continuousPartials;
}
if (opts.interruptionDelay !== undefined) {
configMsg.interruption_delay = opts.interruptionDelay;
}

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.

🟡 Unsupported live options end transcription

On standard models, updateOptions forwards continuous partials or interruption delay without the constructor’s family check. AssemblyAI can reject the update and end transcription.

Prompt for agents
Validate continuousPartials and interruptionDelay against the effective speech model before mutating STT or SpeechStream state, matching the constructor's U3_PRO_ONLY_PARAMS gate. Cover both STT.updateOptions and the exported SpeechStream.updateOptions, and add tests showing standard models reject these options before any UpdateConfiguration message is queued.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +376 to +382
if (opts.languageCodes !== undefined) {
if (!isU3ProModel(this.#opts.speechModel)) {
throw new Error(
`The 'languageCodes' parameter is only supported with the ${U3_PRO_MODELS.join(', ')} models.`,
);
}
opts.languageCodes = normalizeLanguageCodes(opts.languageCodes);

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.

🟡 Combined model and language update fails

When updateOptions changes a standard model to Pro and sets languages together, each stream validates against its old model and throws. The parent retains new settings.

Prompt for agents
Make STT.updateOptions atomic when speechModel and languageCodes arrive together. Validate the complete effective option set before mutating parent or stream state, and have SpeechStream validate languageCodes against the effective incoming speechModel rather than only its old model. Add a test with an existing standard-model stream updated to universal-3-6-pro plus languageCodes.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +71 to +75
function validateAgentContext(agentContext: string | undefined): void {
if (agentContext !== undefined && agentContext.length > MAX_AGENT_CONTEXT_CHARS) {
throw new Error(
`agentContext exceeds maximum length of ${MAX_AGENT_CONTEXT_CHARS} characters (got ${agentContext.length})`,
);

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.

🟡 Emoji contexts hit the wrong limit

For non-BMP context, validateAgentContext counts UTF-16 units instead of characters. Valid text can be rejected, while automatic truncation can split a character.

Prompt for agents
Apply the 1,750-character limit by Unicode code points rather than JavaScript UTF-16 code units in validateAgentContext and _pushConversationItem. Ensure tail truncation cannot split a surrogate pair, and add tests using emoji at and around the limit.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 1 new potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread .changeset/wise-cats-stream.md
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