From 9b9e6ce2ab3d6b5a3a341083bb49e0c0b41d010d Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Sat, 10 Jan 2026 06:32:22 -0500 Subject: [PATCH] fix: correct empty STT_ENGINE handling and improve TTS error response (#20534) - Remove incorrect 403 check that blocked STT when ENGINE="" (local whisper) - Change TTS empty ENGINE check from 403 to 404 for proper semantics --- backend/open_webui/routers/audio.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index 2a64a3598..52e0182ca 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -334,8 +334,8 @@ def load_speech_pipeline(request): async def speech(request: Request, user=Depends(get_verified_user)): if request.app.state.config.TTS_ENGINE == "": raise HTTPException( - status_code=status.HTTP_403_FORBIDDEN, - detail=ERROR_MESSAGES.ACCESS_PROHIBITED, + status_code=status.HTTP_404_NOT_FOUND, + detail=ERROR_MESSAGES.NOT_FOUND, ) if user.role != "admin" and not has_permission( @@ -1169,12 +1169,6 @@ def transcription( language: Optional[str] = Form(None), user=Depends(get_verified_user), ): - if request.app.state.config.STT_ENGINE == "": - raise HTTPException( - status_code=status.HTTP_403_FORBIDDEN, - detail=ERROR_MESSAGES.ACCESS_PROHIBITED, - ) - if user.role != "admin" and not has_permission( user.id, "chat.stt", request.app.state.config.USER_PERMISSIONS ):