Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Verify that the pull request targets the dev branch. Not targeting the dev branch may lead to immediate closure of the PR.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
Agentic AI Code:: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review and manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
This PR adds support for configurable ElevenLabs API base URL to enable EU data residency compliance. Users can now set a custom API base URL via environment variable or admin UI to use ElevenLabs EU endpoint (https://api.eu.residency.elevenlabs.io) instead of the default US endpoint.
Added
Configurable ElevenLabs API base URL for EU data residency support
Environment variable ELEVENLABS_API_BASE_URL to override default API endpoint
Admin UI field for ElevenLabs API base URL configuration in Settings → Audio → TTS → ElevenLabs
URL validation for ElevenLabs API base URL (must start with http:// or https://)
ELEVENLABS_API_BASE_URL field to TTSConfigForm with default value
API base URL exposure in /config endpoint response
Validation and update logic in /config/update endpoint
Changed
Updated all ElevenLabs API calls to use configurable base URL instead of hardcoded US endpoint
Enhanced get_elevenlabs_voices() function to accept api_base_url parameter
Modified ElevenLabs synthesize endpoint to use configurable base URL
Modified ElevenLabs models endpoint to use configurable base URL
Modified ElevenLabs voices endpoint to use configurable base URL
Updated frontend Audio settings component to include ElevenLabs API base URL configuration
Deprecated
[No deprecated functionality in this PR]
Removed
Unused ELEVENLABS_API_BASE_URL import from config module (replaced with dynamic configuration)
Fixed
Fixed hardcoded ElevenLabs API URLs that prevented EU residency compliance
Fixed incorrect variable usage in ElevenLabs API endpoints (was using constant instead of configurable value)
Security
Added URL validation to prevent invalid API base URLs
Input sanitization for ElevenLabs API base URL to ensure only valid HTTP/HTTPS URLs are accepted
Secure storage and handling of configurable API base URL in persistent configuration
Breaking Changes
NO BREAKING CHANGES: This PR is fully backward compatible. Existing installations continue to work without any changes as the default behavior is preserved when configuration is not set.
Additional Information
[Insert any additional context, notes, or explanations for the changes]
[Reference any related issues, commits, or other relevant information]
Screenshots or Videos
[Attach any relevant screenshots or videos demonstrating the changes]
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/18691
**Author:** [@theolrvlv](https://github.com/theolrvlv)
**Created:** 10/28/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `feat/elevenlabs-eu-residency-tts`
---
### 📝 Commits (7)
- [`bb7dcd9`](https://github.com/open-webui/open-webui/commit/bb7dcd9c491ecce2a5fe834a47ac8fca0330b318) feat: add new env ELEVENLABS_API_BASE_URL variables
- [`aedd52c`](https://github.com/open-webui/open-webui/commit/aedd52c0691db510efcb4f4286dac27927adb2de) Merge remote-tracking branch 'origin/dev' into feat/elevenlabs-eu-residency-tts
- [`154896a`](https://github.com/open-webui/open-webui/commit/154896a35d963683abffa608b919fb4ded6f4812) feat(main): initialize AUDIO_TTS_ELEVENLABS_API_BASE_URL in app state
- [`7c4ef88`](https://github.com/open-webui/open-webui/commit/7c4ef886f9bd191f79621c2930d6cc7d1aba6b3a) feat(audio): add configurable ElevenLabs API base URL support
- [`d2f70d0`](https://github.com/open-webui/open-webui/commit/d2f70d00c21dd491d7bca96fff6a33e2b11a42d5) feat(ui): add ElevenLabs API base URL configuration to admin settings
- [`6a90934`](https://github.com/open-webui/open-webui/commit/6a90934a22eaafedf1fad53daec6551c014d7dc6) Merge branch 'dev' into feat/elevenlabs-eu-residency-tts
- [`f2accbf`](https://github.com/open-webui/open-webui/commit/f2accbfae72ef1fb43c1074ecf0ac170489ef1b0) fix(audio): use configurable api_base_url instead of hardcoded ELEVENLABS_API_BASE_URL
### 📊 Changes
**4 files changed** (+59 additions, -21 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+8 -0)
📝 `backend/open_webui/main.py` (+5 -5)
📝 `backend/open_webui/routers/audio.py` (+24 -15)
📝 `src/lib/components/admin/Settings/Audio.svelte` (+22 -1)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Verify that the pull request targets the `dev` branch. Not targeting the `dev` branch may lead to immediate closure of the PR.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** If necessary, update relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs) like environment variables, the tutorials, or other documentation sources.
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [ ] **Testing:** Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
- [ ] **Agentic AI Code:**: Confirm this Pull Request is **not written by any AI Agent** or has at least gone through additional human review **and** manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
- [ ] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Title Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
This PR adds support for configurable ElevenLabs API base URL to enable EU data residency compliance. Users can now set a custom API base URL via environment variable or admin UI to use ElevenLabs EU endpoint (`https://api.eu.residency.elevenlabs.io`) instead of the default US endpoint.
### Added
- Configurable ElevenLabs API base URL for EU data residency support
- Environment variable `ELEVENLABS_API_BASE_URL` to override default API endpoint
- Admin UI field for ElevenLabs API base URL configuration in Settings → Audio → TTS → ElevenLabs
- URL validation for ElevenLabs API base URL (must start with http:// or https://)
- Support for EU residency endpoint: https://api.eu.residency.elevenlabs.io
- `ELEVENLABS_API_BASE_URL` field to TTSConfigForm with default value
- API base URL exposure in `/config` endpoint response
- Validation and update logic in `/config/update` endpoint
### Changed
- Updated all ElevenLabs API calls to use configurable base URL instead of hardcoded US endpoint
- Enhanced `get_elevenlabs_voices()` function to accept `api_base_url` parameter
- Modified ElevenLabs synthesize endpoint to use configurable base URL
- Modified ElevenLabs models endpoint to use configurable base URL
- Modified ElevenLabs voices endpoint to use configurable base URL
- Updated frontend Audio settings component to include ElevenLabs API base URL configuration
### Deprecated
- [No deprecated functionality in this PR]
### Removed
- Unused `ELEVENLABS_API_BASE_URL` import from config module (replaced with dynamic configuration)
### Fixed
- Fixed hardcoded ElevenLabs API URLs that prevented EU residency compliance
- Fixed incorrect variable usage in ElevenLabs API endpoints (was using constant instead of configurable value)
### Security
- Added URL validation to prevent invalid API base URLs
- Input sanitization for ElevenLabs API base URL to ensure only valid HTTP/HTTPS URLs are accepted
- Secure storage and handling of configurable API base URL in persistent configuration
### Breaking Changes
- **NO BREAKING CHANGES**: This PR is fully backward compatible. Existing installations continue to work without any changes as the default behavior is preserved when configuration is not set.
---
### Additional Information
- [Insert any additional context, notes, or explanations for the changes]
- [Reference any related issues, commits, or other relevant information]
### Screenshots or Videos
- [Attach any relevant screenshots or videos demonstrating the changes]
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18691
Author: @theolrvlv
Created: 10/28/2025
Status: ❌ Closed
Base:
dev← Head:feat/elevenlabs-eu-residency-tts📝 Commits (7)
bb7dcd9feat: add new env ELEVENLABS_API_BASE_URL variablesaedd52cMerge remote-tracking branch 'origin/dev' into feat/elevenlabs-eu-residency-tts154896afeat(main): initialize AUDIO_TTS_ELEVENLABS_API_BASE_URL in app state7c4ef88feat(audio): add configurable ElevenLabs API base URL supportd2f70d0feat(ui): add ElevenLabs API base URL configuration to admin settings6a90934Merge branch 'dev' into feat/elevenlabs-eu-residency-ttsf2accbffix(audio): use configurable api_base_url instead of hardcoded ELEVENLABS_API_BASE_URL📊 Changes
4 files changed (+59 additions, -21 deletions)
View changed files
📝
backend/open_webui/config.py(+8 -0)📝
backend/open_webui/main.py(+5 -5)📝
backend/open_webui/routers/audio.py(+24 -15)📝
src/lib/components/admin/Settings/Audio.svelte(+22 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
This PR adds support for configurable ElevenLabs API base URL to enable EU data residency compliance. Users can now set a custom API base URL via environment variable or admin UI to use ElevenLabs EU endpoint (
https://api.eu.residency.elevenlabs.io) instead of the default US endpoint.Added
ELEVENLABS_API_BASE_URLto override default API endpointELEVENLABS_API_BASE_URLfield to TTSConfigForm with default value/configendpoint response/config/updateendpointChanged
get_elevenlabs_voices()function to acceptapi_base_urlparameterDeprecated
Removed
ELEVENLABS_API_BASE_URLimport from config module (replaced with dynamic configuration)Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.