Skip to content

fix: resolve audio provider short-alias prefix in parseAudioModel (#10586) - #10747

Merged
diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10586-audio-alias-prefix-gap
Aug 19, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10586-audio-alias-prefix-gap

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

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 (alias el for elevenlabs) alongside
elevenlabs/eleven_multilingual_v2. parseAudioModel() in
open-sse/config/audioRegistry.ts only prefix-matched against the
AUDIO_SPEECH_PROVIDERS / AUDIO_TRANSCRIPTION_PROVIDERS / AUDIO_TRANSLATION_PROVIDERS
canonical registry keys, never against the short alias each provider is
registered under (src/shared/constants/providers/audio.ts) — so the
alias-prefixed id the catalog itself just advertised 400ed with "Invalid speech
model" when sent back to /v1/audio/speech or /v1/audio/transcriptions.

Fix

Added a Phase 1.5 prefix-match in parseAudioModel() that additionally tries
getProviderAlias(providerId) (from src/shared/constants/providers.ts —
covers AUDIO_ONLY_PROVIDERS, unlike the chat-only PROVIDER_ID_TO_ALIAS map)
for every registry entry, resolving to the same canonical providerId a
request 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_v2 resolved to {provider: null, ...}), GREEN after.
Also adds enumeration tests covering every provider with a registered short
alias in AUDIO_SPEECH_PROVIDERS, AUDIO_TRANSCRIPTION_PROVIDERS, and
AUDIO_TRANSLATION_PROVIDERS (elevenlabs/el, deepgram/dg, soniox/sx,
assemblyai/aai, etc.) so both the alias-prefixed and canonical-prefixed
catalog ids resolve to the same provider.

Scope

Out of scope per the plan-file (tracked separately under the parent tracker
#10591): the missing /v1/realtime route, the
mistral/voxtral-mini-transcribe-2507 vs nested-openrouter-model mismatch, and
the google/gemini-2.5-flash-preview-tts vs vertex-only registry gap.

Gates run

  • node --import tsx/esm --test tests/unit/audio-alias-prefix-10586.test.ts — 4/4 pass
  • Full existing audio-module test suite (speech/transcription/translation handlers, provider-node selection, soniox, fishaudio, openrouter nested models, combo resolution) — 94/94 pass
  • node scripts/check/check-file-size.mjs (changed files) — OK
  • node scripts/check/check-changelog-integrity.mjs — OK
  • npm run typecheck:core — OK
  • npx eslint --suppressions-location config/quality/eslint-suppressions.json (changed files) — clean
  • node 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 via ps, 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.

⚠️ base-red inherited: #9985

@diegosouzapw
diegosouzapw merged commit a8000bf into release/v3.8.50 Aug 19, 2026
11 checks passed
@diegosouzapw
diegosouzapw deleted the fix/10586-audio-alias-prefix-gap branch August 19, 2026 14:08
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 20, 2026
giauphan pushed a commit to giauphan/OmniRoute that referenced this pull request Aug 20, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
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.

fix(api): /v1/models advertises realtime, el/*, Voxtral, and Gemini TTS ids that no voice route accepts

2 participants