Skip to content

feat(audio): add native ElevenLabs HTTP compatibility routes - #11312

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.50from
RaviTharuma:fix/10556-elevenlabs-native
Aug 24, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.50from
RaviTharuma:fix/10556-elevenlabs-native

Conversation

@RaviTharuma

@RaviTharuma RaviTharuma commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds native ElevenLabs compatibility routes for GET /v1/voices, POST /v1/text-to-speech/{voiceId}, and POST /v1/speech-to-text.
  • Selects the stored elevenlabs credential through OmniRoute's quota-preflight path and sends it only as xi-api-key.
  • Preserves query strings, JSON/multipart request bodies, binary response bodies, upstream status/content type/retry metadata, and upstream error payloads.
  • Restricts voiceId to one safe URL segment before constructing the fixed-host upstream URL.
  • Keeps existing /v1/* CLIENT_API authz and CORS policy authoritative; client authorization headers are never forwarded.
  • Intentionally does not claim WebSocket Realtime, realtime Scribe, or livecall support.

Related Issues

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path
  • npm run lint — focused ESLint passed for every changed TypeScript file; full gate runs in CI
  • Reconciled with current release/v3.8.50 at ac02c5b42; focused checks rerun afterward
  • Production-code changes include a new automated test in this PR
  • npm run check:changelog-integrity
  • git diff --check

Post-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 passed
  • focused ESLint over all changed TypeScript files — passed
  • npm run check:changelog-integrity — passed

The current release base has a pre-existing typecheck:core / typecheck:noimplicit:core failure in open-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.ts
  • tests/unit/hard-session-lease-bypass-inventory.test.ts

Regression coverage verifies URL/query forwarding, stored xi-api-key use 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.

@RaviTharuma

Copy link
Copy Markdown
Contributor Author

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 (vibeproxy-free/naga-free) on the release base.

@RaviTharuma
RaviTharuma force-pushed the fix/10556-elevenlabs-native branch from c38832a to ccef3fe Compare August 24, 2026 02:29
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Rebased onto current release/v3.8.50 (ac02c5b42) and force-pushed with lease. Post-rebase verification: native ElevenLabs routes 6/6 passed; hard-session credential inventory 3/3 passed; focused ESLint passed; changelog integrity passed; diff check passed. The current release base itself has a pre-existing typecheck:core / typecheck:noimplicit:core failure in open-sse/translator/response/openai-responses/pureHelpers.ts (implicit-any parameters); this PR does not touch that file.

@diegosouzapw
diegosouzapw merged commit 690f684 into cheaper-inference:release/v3.8.50 Aug 24, 2026
13 of 16 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 25, 2026
…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
@RaviTharuma
RaviTharuma deleted the fix/10556-elevenlabs-native branch September 23, 2026 19:37
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…-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!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…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
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.

feat(providers): native ElevenLabs routes + /v1/realtime for OpenClaw Talk/livecall

2 participants