[Bugfix][Router] Default transcription language to None (auto-detect) - #1070
Open
WaelRabah wants to merge 6 commits into
Open
[Bugfix][Router] Default transcription language to None (auto-detect)#1070WaelRabah wants to merge 6 commits into
WaelRabah wants to merge 6 commits into
Conversation
WaelRabah
requested review from
ApostaC,
Shaoting-Feng,
YuhanLiu11 and
ruizhang0101
as code owners
September 1, 2026 14:40
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the transcription routing to stop defaulting the language parameter to 'en', allowing the backend to auto-detect the language when it is omitted. The corresponding test cases have been updated to reflect this change. Feedback suggests sanitizing the language input to filter out common null-like string values (such as 'none', 'null', or 'undefined') and whitespace, preventing potential backend validation errors from client-side serialization quirks.
Stop forcing transcription language to "en" when the client does not specify one. vLLM's own default is None, letting the model auto-detect the language. Default to None and omit the language field entirely when absent so aiohttp does not forward the literal string "None" to the backend. Update the multipart proxy test to assert the field is absent (None) by default. Signed-off-by: Wael Rabah <47258198+WaelRabah@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Wael Rabah <47258198+WaelRabah@users.noreply.github.com>
WaelRabah
force-pushed
the
fix/audio-transcription-language-default
branch
2 times, most recently
from
September 2, 2026 13:37
14f15ce to
df148fe
Compare
Signed-off-by: Wael Rabah <47258198+WaelRabah@users.noreply.github.com>
WaelRabah
force-pushed
the
fix/audio-transcription-language-default
branch
from
September 2, 2026 14:07
df148fe to
b12d71a
Compare
Signed-off-by: Wael Rabah <47258198+WaelRabah@users.noreply.github.com>
WaelRabah
force-pushed
the
fix/audio-transcription-language-default
branch
2 times, most recently
from
September 7, 2026 15:40
9492583 to
6987c7b
Compare
Signed-off-by: Wael Rabah <47258198+WaelRabah@users.noreply.github.com>
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
route_general_transcriptionswas defaulting the transcriptionlanguageto"en"when the client did not supply one. This forced the backend to transcribe in English even when the model could auto-detect the language.vLLM's own default for
languageisNone, which leaves language detection to the model. This change aligns the router with that behavior.Changes
src/vllm_router/services/request_service/request.pylanguagetoNone(form.get("language")instead ofform.get("language", "en")).languagefield in the outbound multipart form data when it is set. When absent,aiohttp.FormDatawould otherwise encodeNoneas the literal string"None"and send it to the backend as an invalid language.src/tests/test_multipart_proxy.pyNoneby default.Testing
src/tests/test_multipart_proxy.py— 4 passed.