Repository navigation
fix: resolve audio provider short-alias prefix in parseAudioModel (#10586) - #10747
Merged
Merged
Conversation
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 20, 2026
…egosouzapw#10586) (diegosouzapw#10747) Co-authored-by: Markus Hartung <mail@hartmark.se>
giauphan
pushed a commit
to giauphan/OmniRoute
that referenced
this pull request
Aug 20, 2026
…egosouzapw#10586) (diegosouzapw#10747) Co-authored-by: Markus Hartung <mail@hartmark.se>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…egosouzapw#10586) (diegosouzapw#10747) Co-authored-by: Markus Hartung <mail@hartmark.se>
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.
Closes #10586
Root cause
GET /v1/models advertises both the short provider-alias id and the canonical
provider id for every model (default
MODELS_CATALOG_PREFIX_MODE="dual"), e.g.el/eleven_multilingual_v2(aliaselforelevenlabs) alongsideelevenlabs/eleven_multilingual_v2.parseAudioModel()inopen-sse/config/audioRegistry.tsonly prefix-matched against theAUDIO_SPEECH_PROVIDERS/AUDIO_TRANSCRIPTION_PROVIDERS/AUDIO_TRANSLATION_PROVIDERScanonical registry keys, never against the short alias each provider is
registered under (
src/shared/constants/providers/audio.ts) — so thealias-prefixed id the catalog itself just advertised 400ed with "Invalid speech
model" when sent back to
/v1/audio/speechor/v1/audio/transcriptions.Fix
Added a Phase 1.5 prefix-match in
parseAudioModel()that additionally triesgetProviderAlias(providerId)(fromsrc/shared/constants/providers.ts—covers
AUDIO_ONLY_PROVIDERS, unlike the chat-onlyPROVIDER_ID_TO_ALIASmap)for every registry entry, resolving to the same canonical
providerIdarequest already reaches via the long-form id. This only widens what parses; it
cannot change routing for any currently-working id. Verified there is no alias
string that collides with another provider's canonical id across the speech,
transcription, and translation registries.
Regression test
tests/unit/audio-alias-prefix-10586.test.ts— proven RED before the fix(
el/eleven_multilingual_v2resolved to{provider: null, ...}), GREEN after.Also adds enumeration tests covering every provider with a registered short
alias in
AUDIO_SPEECH_PROVIDERS,AUDIO_TRANSCRIPTION_PROVIDERS, andAUDIO_TRANSLATION_PROVIDERS(elevenlabs/el, deepgram/dg, soniox/sx,assemblyai/
aai, etc.) so both the alias-prefixed and canonical-prefixedcatalog ids resolve to the same provider.
Scope
Out of scope per the plan-file (tracked separately under the parent tracker
#10591): the missing
/v1/realtimeroute, themistral/voxtral-mini-transcribe-2507vs nested-openrouter-model mismatch, andthe
google/gemini-2.5-flash-preview-ttsvs vertex-only registry gap.Gates run
node --import tsx/esm --test tests/unit/audio-alias-prefix-10586.test.ts— 4/4 passnode scripts/check/check-file-size.mjs(changed files) — OKnode scripts/check/check-changelog-integrity.mjs— OKnpm run typecheck:core— OKnpx eslint --suppressions-location config/quality/eslint-suppressions.json(changed files) — cleannode scripts/check/check-complexity.mjs/check-cognitive-complexity.mjs— these are whole-repo ratchets (ignore file args); attempted twice but did not finish within the session due to severe devbox CPU saturation from many concurrent parallel sessions running the same full-repo scan simultaneously (confirmed viaps, not specific to this change). The diff is a ~10-line addition mirroring the pre-existing Phase-1 prefix-match loop in the same function, so complexity risk is minimal.