Skip to content

Commit 41df9a9

Browse files
badbreadclaude
andcommitted
Fix TTS test button failing on masked API keys
The test endpoint was using the masked placeholder (***MASKED***) sent by the frontend form state instead of resolving the real key from disk. Now detects masked values and falls through to _resolve_cloud_tts_key. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 75e6098 commit 41df9a9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dashboard/backend/routers/audio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,8 +1615,10 @@ async def test_tts_provider(request: TestTtsProviderRequest) -> TestTtsProviderR
16151615
provider = request.provider.lower()
16161616

16171617
# Resolve the API key: prefer the explicit field, then fall back to config.
1618+
# If the frontend sends a masked placeholder (e.g. "***MASKED***"), ignore
1619+
# it and resolve from the raw config instead.
16181620
api_key = request.api_key
1619-
if not api_key:
1621+
if not api_key or api_key.startswith("***"):
16201622
key_name_map = {
16211623
"elevenlabs": "elevenlabs_api_key",
16221624
"openai": "openai_api_key",

0 commit comments

Comments
 (0)