[PR #23237] [CLOSED] feat: add OpenAI Realtime WebRTC voice mode #65954

Closed
opened 2026-05-06 12:02:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23237
Author: @rbb-dev
Created: 3/30/2026
Status: Closed

Base: devHead: gpt-realtime


📝 Commits (1)

  • 2fa0fb6 feat: add OpenAI Realtime WebRTC voice mode

📊 Changes

53 files changed (+10123 additions, -345 deletions)

View changed files

📝 backend/open_webui/config.py (+260 -0)
📝 backend/open_webui/main.py (+79 -0)
📝 backend/open_webui/models/chat_messages.py (+6 -0)
📝 backend/open_webui/models/chats.py (+3 -2)
backend/open_webui/realtime/__init__.py (+0 -0)
backend/open_webui/realtime/app_hooks.py (+73 -0)
backend/open_webui/realtime/bootstrap.py (+342 -0)
backend/open_webui/realtime/catalog.py (+161 -0)
backend/open_webui/realtime/chat_handoff.py (+77 -0)
backend/open_webui/realtime/chat_merge.py (+139 -0)
backend/open_webui/realtime/chat_sync.py (+734 -0)
backend/open_webui/realtime/client_config.py (+37 -0)
backend/open_webui/realtime/config_snapshot.py (+232 -0)
backend/open_webui/realtime/constants.py (+47 -0)
backend/open_webui/realtime/context_builder.py (+323 -0)
backend/open_webui/realtime/contracts.py (+209 -0)
backend/open_webui/realtime/ephemeral_store.py (+109 -0)
backend/open_webui/realtime/events.py (+52 -0)
backend/open_webui/realtime/model_settings.py (+15 -0)
backend/open_webui/realtime/negotiate.py (+279 -0)

...and 33 more files

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.

This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.

Checklist status for this PR:

  • Target branch: Targets dev.
  • Description: Completed below.
  • Changelog: Completed below using the template sections.
  • Documentation: Matching docs changes are prepared in open-webui/docs but still need to be pushed and opened as a companion docs PR.
  • Dependencies: No new or upgraded dependencies were introduced.
  • Testing: Manually tested on the dev deployment for realtime model discovery, call startup, typed-message handoff, tool execution inside realtime sessions, check-in prompts, and idle timeout behavior.
  • Agentic AI Code: AI-assisted development was followed by additional human review and manual testing before submission.
  • Code review: Self-review completed, including post-rebase conflict resolution and follow-up fixes found during dev-server testing.
  • Design & Architecture: This is a substantial feature addition with new admin/chat settings and runtime flows; if maintainers want an explicit design discussion link, add it here before submission.
  • Git Hygiene: Branch is rebased onto current dev and condensed to a single feature commit.
  • Title Prefix: feat: add OpenAI Realtime WebRTC voice mode

Changelog Entry

Description

  • Adds OpenAI Realtime WebRTC voice mode to Open WebUI, including admin configuration, chat-side realtime voice UX, backend session negotiation/sideband orchestration, typed-chat handoff, and chat history/context sync for active voice sessions.

Added

  • A new backend realtime subsystem under backend/open_webui/realtime/ for session lifecycle, WebRTC negotiation, sideband control, context bootstrap, pending text handling, tool execution, ownership, and chat merge/sync.
  • Admin realtime settings and chat realtime voice settings UI for configuring the OpenAI realtime engine and per-chat defaults.
  • Realtime overlay components and browser runtimes for audio capture, WebRTC transport, socket events, and tool target handling.
  • Client-facing realtime config/capability plumbing and model discovery for exposing supported realtime models and voices to the frontend.

Changed

  • Existing chat entrypoints now support realtime-capable models across voice-button start, typed send handoff, edited resend, and branch/regenerate flows.
  • Chat UI and settings now rely on backend-qualified realtime capability data for model eligibility, available voices, and realtime-specific user controls.
  • Audio routes, middleware, socket hooks, and chat persistence paths were extended to support realtime negotiation, sideband lifecycle events, tool execution, and merge completed voice turns back into normal chat history.

Deprecated

  • None.

Removed

  • None.

Fixed

  • None separately from the feature work above.

Security

  • None.

Breaking Changes

  • None.

Additional Information

  • None.

Screenshots or Videos

image image image image image image image

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/23237 **Author:** [@rbb-dev](https://github.com/rbb-dev) **Created:** 3/30/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `gpt-realtime` --- ### 📝 Commits (1) - [`2fa0fb6`](https://github.com/open-webui/open-webui/commit/2fa0fb6b66d15ef25ffac99114aba364bbaa1310) feat: add OpenAI Realtime WebRTC voice mode ### 📊 Changes **53 files changed** (+10123 additions, -345 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+260 -0) 📝 `backend/open_webui/main.py` (+79 -0) 📝 `backend/open_webui/models/chat_messages.py` (+6 -0) 📝 `backend/open_webui/models/chats.py` (+3 -2) ➕ `backend/open_webui/realtime/__init__.py` (+0 -0) ➕ `backend/open_webui/realtime/app_hooks.py` (+73 -0) ➕ `backend/open_webui/realtime/bootstrap.py` (+342 -0) ➕ `backend/open_webui/realtime/catalog.py` (+161 -0) ➕ `backend/open_webui/realtime/chat_handoff.py` (+77 -0) ➕ `backend/open_webui/realtime/chat_merge.py` (+139 -0) ➕ `backend/open_webui/realtime/chat_sync.py` (+734 -0) ➕ `backend/open_webui/realtime/client_config.py` (+37 -0) ➕ `backend/open_webui/realtime/config_snapshot.py` (+232 -0) ➕ `backend/open_webui/realtime/constants.py` (+47 -0) ➕ `backend/open_webui/realtime/context_builder.py` (+323 -0) ➕ `backend/open_webui/realtime/contracts.py` (+209 -0) ➕ `backend/open_webui/realtime/ephemeral_store.py` (+109 -0) ➕ `backend/open_webui/realtime/events.py` (+52 -0) ➕ `backend/open_webui/realtime/model_settings.py` (+15 -0) ➕ `backend/open_webui/realtime/negotiate.py` (+279 -0) _...and 33 more files_ </details> ### 📄 Description <!-- ⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️ 1. Target the `dev` branch. PRs targeting `main` will be automatically closed. 2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR. --> # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request. This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR. **Checklist status for this PR:** - [x] **Target branch:** Targets `dev`. - [x] **Description:** Completed below. - [x] **Changelog:** Completed below using the template sections. - [x] **Documentation:** Matching docs changes are prepared in `open-webui/docs` but still need to be pushed and opened as a companion docs PR. - [x] **Dependencies:** No new or upgraded dependencies were introduced. - [x] **Testing:** Manually tested on the dev deployment for realtime model discovery, call startup, typed-message handoff, tool execution inside realtime sessions, check-in prompts, and idle timeout behavior. - [x] **Agentic AI Code:** AI-assisted development was followed by additional human review and manual testing before submission. - [x] **Code review:** Self-review completed, including post-rebase conflict resolution and follow-up fixes found during dev-server testing. - [ ] **Design & Architecture:** This is a substantial feature addition with new admin/chat settings and runtime flows; if maintainers want an explicit design discussion link, add it here before submission. - [x] **Git Hygiene:** Branch is rebased onto current `dev` and condensed to a single feature commit. - [x] **Title Prefix:** `feat: add OpenAI Realtime WebRTC voice mode` # Changelog Entry ### Description - Adds OpenAI Realtime WebRTC voice mode to Open WebUI, including admin configuration, chat-side realtime voice UX, backend session negotiation/sideband orchestration, typed-chat handoff, and chat history/context sync for active voice sessions. ### Added - A new backend realtime subsystem under `backend/open_webui/realtime/` for session lifecycle, WebRTC negotiation, sideband control, context bootstrap, pending text handling, tool execution, ownership, and chat merge/sync. - Admin realtime settings and chat realtime voice settings UI for configuring the OpenAI realtime engine and per-chat defaults. - Realtime overlay components and browser runtimes for audio capture, WebRTC transport, socket events, and tool target handling. - Client-facing realtime config/capability plumbing and model discovery for exposing supported realtime models and voices to the frontend. ### Changed - Existing chat entrypoints now support realtime-capable models across voice-button start, typed send handoff, edited resend, and branch/regenerate flows. - Chat UI and settings now rely on backend-qualified realtime capability data for model eligibility, available voices, and realtime-specific user controls. - Audio routes, middleware, socket hooks, and chat persistence paths were extended to support realtime negotiation, sideband lifecycle events, tool execution, and merge completed voice turns back into normal chat history. ### Deprecated - None. ### Removed - None. ### Fixed - None separately from the feature work above. ### Security - None. ### Breaking Changes - None. --- ### Additional Information - None. --- ### Screenshots or Videos <img width="1060" height="1929" alt="image" src="https://github.com/user-attachments/assets/a31006af-19d6-4c45-aa74-45121107c38a" /> <img width="1052" height="797" alt="image" src="https://github.com/user-attachments/assets/654e7f33-d98e-4097-bfc3-db4729bb7390" /> <img width="1046" height="851" alt="image" src="https://github.com/user-attachments/assets/6a8a290f-d10f-4265-aad3-35b8fc7d8701" /> <img width="1003" height="846" alt="image" src="https://github.com/user-attachments/assets/824c7f38-57c7-4455-a7ab-54e6a981de35" /> <img width="995" height="843" alt="image" src="https://github.com/user-attachments/assets/a390f78a-7a76-4716-aaa7-e72c69abfe68" /> <img width="996" height="847" alt="image" src="https://github.com/user-attachments/assets/32fa9756-64ab-42d6-9197-71a4ca91623e" /> <img width="1207" height="723" alt="image" src="https://github.com/user-attachments/assets/b74e1c69-a06b-42ce-8807-5ba2d274f863" /> ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] 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. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 12:02:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#65954