Repository navigation
fix(assemblyai): enforce 10-code language_codes cap on universal-3-6-pro - #8509
Merged
chenghao-mou merged 2 commits intoDec 2, 2026
Conversation
Contributor
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
chenghao-mou
approved these changes
Nov 11, 2026
Member
|
Thanks for the PR! Happy to merge it once the CLA is signed. |
Contributor
Author
|
Thanks @chenghao-mou! CLA has been signed. |
The AssemblyAI plugin applies the 10-code limit after normalization and deduplication.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enforce AssemblyAI's 10-code limit on
language_codesacross all models, includinguniversal-3-6-pro.Background & Reason
Previously,
universal-3-6-prowas treated as having uncappedlanguage_codesvia_UNCAPPED_LANGUAGE_CODES_MODELS. However, AssemblyAI's streaming API strictly enforces a maximum of 10 language codes on Universal-3.6 Pro (as it does on all Universal-3 Pro models).When 11 or more codes are supplied, the AssemblyAI WebSocket server rejects the connection (or runtime
UpdateConfiguration) with:{"type":"Error", "error_code":3006, "error":"User Input Validation Error: Invalid 'language_codes': Value error, Max 10 language codes"}and abruptly terminates the WebSocket with error code 3006.
Mirroring this cap client-side prevents this runtime crash by raising a clear
ValueErrorupfront during construction orupdate_options.Changes
_UNCAPPED_LANGUAGE_CODES_MODELSinlivekit.plugins.assemblyai.stt._MAX_LANGUAGE_CODES = 10across all models in_normalize_language_codes.test_language_codes_max_10_on_universal_3_6_prointests/test_plugin_assemblyai_stt.pyto verify the 10-code validation on Universal-3.6 Pro.