From c7e159bdd66a1d05331e6a579e627004bc3c51d1 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Tue, 20 Oct 2026 20:13:37 +0200 Subject: [PATCH] fix: voice calls do not forward user info headers to the realtime provider (#32733) With ENABLE_FORWARD_USER_INFO_HEADERS turned on, voice calls in Realtime mode connected to the configured realtime provider without any user info headers, so a gateway in front of the provider could not tell which user was on the call. The call connection now sends the same user headers (or the signed user JWT, when configured) as chat requests and realtime text-to-speech already do. --- backend/open_webui/routers/audio/realtime.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/audio/realtime.py b/backend/open_webui/routers/audio/realtime.py index a6ee756679..f51bb2324a 100644 --- a/backend/open_webui/routers/audio/realtime.py +++ b/backend/open_webui/routers/audio/realtime.py @@ -9,13 +9,13 @@ from urllib.parse import urlencode, urlsplit, urlunsplit import aiohttp from fastapi import APIRouter, WebSocket, WebSocketDisconnect from open_webui.config import BYPASS_ADMIN_ACCESS_CONTROL, DEFAULT_REALTIME_CALL_PROMPT_TEMPLATE -from open_webui.env import AIOHTTP_CLIENT_SESSION_SSL, BYPASS_MODEL_ACCESS_CONTROL +from open_webui.env import AIOHTTP_CLIENT_SESSION_SSL, BYPASS_MODEL_ACCESS_CONTROL, ENABLE_FORWARD_USER_INFO_HEADERS from open_webui.models.chats import Chats from open_webui.models.config import Config from open_webui.models.models import Models, ModelVoice from open_webui.utils.access_control import has_permission from open_webui.utils.auth import get_verified_user_by_token -from open_webui.utils.headers import get_microsoft_entra_id_access_token +from open_webui.utils.headers import get_microsoft_entra_id_access_token, include_user_info_headers from open_webui.utils.json_codec import JSONCodec from open_webui.utils.models import check_model_access, get_all_models from open_webui.utils.session_pool import get_session @@ -424,6 +424,8 @@ async def realtime_call(ws: WebSocket): async with asyncio.timeout(30): async with asyncio.timeout(15): ws_url, headers = await _get_realtime_connection(config) + if ENABLE_FORWARD_USER_INFO_HEADERS: + headers = include_user_info_headers(headers, user) session = await get_session() try: upstream = await session.ws_connect(