You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: preserve HTTP scheme for realtime TTS endpoints - #899
Streaming TTS currently rewrites every configured endpoint to wss:// before calling build_ws_url. With ElevenLabs(base_url="http://localhost:8080/proxy"), this attempts TLS against a plain HTTP proxy, unlike the shared URL helper and other realtime clients.
Pass the original base URL to build_ws_url, which already maps HTTP to WS and HTTPS to WSS while preserving the base path. Only the hand-maintained wrapper and its tests are changed, as required by .fernignore.
Validation: the new public-client regression fails before the change and passes afterward. All 23 streaming-TTS parameter and URL-helper tests pass, and Ruff passes on both changed files. No live provider requests were made.
Low Risk
Narrow change to realtime TTS URL construction with a targeted regression test; HTTPS production URLs still become wss:// via build_ws_url.
Overview Realtime streaming TTS no longer rewrites the configured base_url to wss:// in the client constructor. It now stores the original base URL and lets build_ws_url map http→ws and https→wss, including proxy paths like http://localhost:8080/proxy.
This fixes local or plain-HTTP proxies that previously attempted TLS because the URL was forced to wss:// before the shared helper ran.
A regression test drives ElevenLabs with an HTTP base_url and asserts the websocket connect URL starts with ws:// and keeps the proxy path prefix.
Reviewed by Cursor Bugbot for commit 7acf085. Bugbot is set up for automated code reviews on this repo. Configure here.
This branch has not been deployed
No deployments
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
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.
Streaming TTS currently rewrites every configured endpoint to
wss://before callingbuild_ws_url. WithElevenLabs(base_url="http://localhost:8080/proxy"), this attempts TLS against a plain HTTP proxy, unlike the shared URL helper and other realtime clients.Pass the original base URL to
build_ws_url, which already maps HTTP to WS and HTTPS to WSS while preserving the base path. Only the hand-maintained wrapper and its tests are changed, as required by.fernignore.Validation: the new public-client regression fails before the change and passes afterward. All 23 streaming-TTS parameter and URL-helper tests pass, and Ruff passes on both changed files. No live provider requests were made.