Repository navigation
feat(audio): add native ElevenLabs HTTP compatibility routes - #11312
diegosouzapw merged 2 commits into
Conversation
|
CI follow-up: the first run exposed the repository credential-selection inventory ratchet, not a product failure. Added the new shared helper as one classified credential-selection site and reran both focused checks locally: inventory 3/3 passed; native ElevenLabs routes 6/6 passed. The unrelated shard-4 failure is the existing static-provider catalog golden drift ( |
c38832a to
ccef3fe
Compare
|
Rebased onto current |
690f684
into
cheaper-inference:release/v3.8.50
…enerate the omni-inference skill Two gates in the Lint job, both inherited — each was hidden behind the one before it. i18n value drift: #11283 rewrote sidebar.trafficInspectorSubtitle in en.json without touching the 42 translations, so 32 locales kept serving a sentence the English no longer says. Most take the documented __MISSING__: placeholder, which makes the runtime serve the corrected English until the translation pipeline catches up. Three do not: - vi cannot take a placeholder at all — tests/unit/i18n-vi-completeness.test.ts bans any __MISSING__/__TODO__ value outright, so it needs a real translation. - pt and pt-BR are translated for real rather than placeheld, because a placeholder there means this project's own maintainer reads the sidebar in English. Each file changed by exactly one line; the JSON was not reserialised wholesale. agent-skills-sync: skills/omni-inference/SKILL.md was missing the ElevenLabs voices and speech-to-text routes added by #11312, so the generator reported one file out of date and the gate exited 2. Regenerated — purely additive, 48 lines, no deletions. Verified: check-ui-value-drift PASS, i18n:check-ui-coverage PASS (42 locales), i18n-vi-completeness 5/5, check:agent-skills-sync 46 unchanged. Refs #10692
…-inference#11312) Validated on a 17-PR combined board: elevenlabs-native-routes + hard-session-lease-bypass-inventory (9/9) within the board's 287/287, typecheck:core clean. Native ElevenLabs compatibility routes (voices, TTS, STT) reusing the stored credential via quota-preflight, sent only as xi-api-key; client authorization headers never forwarded. Closes cheaper-inference#10556. Thank you @RaviTharuma!
…enerate the omni-inference skill Two gates in the Lint job, both inherited — each was hidden behind the one before it. i18n value drift: cheaper-inference#11283 rewrote sidebar.trafficInspectorSubtitle in en.json without touching the 42 translations, so 32 locales kept serving a sentence the English no longer says. Most take the documented __MISSING__: placeholder, which makes the runtime serve the corrected English until the translation pipeline catches up. Three do not: - vi cannot take a placeholder at all — tests/unit/i18n-vi-completeness.test.ts bans any __MISSING__/__TODO__ value outright, so it needs a real translation. - pt and pt-BR are translated for real rather than placeheld, because a placeholder there means this project's own maintainer reads the sidebar in English. Each file changed by exactly one line; the JSON was not reserialised wholesale. agent-skills-sync: skills/omni-inference/SKILL.md was missing the ElevenLabs voices and speech-to-text routes added by cheaper-inference#11312, so the generator reported one file out of date and the gate exited 2. Regenerated — purely additive, 48 lines, no deletions. Verified: check-ui-value-drift PASS, i18n:check-ui-coverage PASS (42 locales), i18n-vi-completeness 5/5, check:agent-skills-sync 46 unchanged. Refs cheaper-inference#10692
Summary
GET /v1/voices,POST /v1/text-to-speech/{voiceId}, andPOST /v1/speech-to-text.elevenlabscredential through OmniRoute's quota-preflight path and sends it only asxi-api-key.voiceIdto one safe URL segment before constructing the fixed-host upstream URL./v1/*CLIENT_API authz and CORS policy authoritative; client authorization headers are never forwarded.Related Issues
Validation
npm run lint— focused ESLint passed for every changed TypeScript file; full gate runs in CIrelease/v3.8.50atac02c5b42; focused checks rerun afterwardnpm run check:changelog-integritygit diff --checkPost-rebase focused commands:
node --import tsx/esm --test tests/unit/elevenlabs-native-routes.test.ts tests/unit/hard-session-lease-bypass-inventory.test.ts— 9 passednpm run check:changelog-integrity— passedThe current release base has a pre-existing
typecheck:core/typecheck:noimplicit:corefailure inopen-sse/translator/response/openai-responses/pureHelpers.ts(implicit-any parameters). This PR does not touch that file.Tests Added Or Updated
tests/unit/elevenlabs-native-routes.test.tstests/unit/hard-session-lease-bypass-inventory.test.tsRegression coverage verifies URL/query forwarding, stored
xi-api-keyuse without leaking it in responses, JSON TTS requests, multipart STT uploads, binary audio responses, upstream error/status preservation, missing credentials, traversal rejection, and classification of the shared credential-selection site.Coverage Notes
The new route-level test exercises all three handlers plus the shared proxy's successful JSON/binary/multipart paths, missing-credential branch, upstream non-2xx pass-through, and unsafe-voice rejection. CI owns the full coverage ratchet and production build.
Reviewer Notes
No migrations, dependencies, settings, or feature flags. The proxy host and native paths are fixed constants. Response headers are allowlisted rather than copied wholesale. Transport exceptions pass through OmniRoute's sanitized error helper.