mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #18764] [CLOSED] feat: add ability to set default for stream response chat option #40541
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18764
Author: @zalbiraw
Created: 10/31/2025
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (1)
baa9924add ability to set default for stream reponse chat option📊 Changes
6 files changed (+18 additions, -2 deletions)
View changed files
📝
.env.example(+6 -0)📝
backend/open_webui/config.py(+6 -0)📝
backend/open_webui/main.py(+3 -0)📝
src/lib/components/chat/Chat.svelte(+1 -0)📝
src/lib/components/notes/NoteEditor.svelte(+1 -1)📝
src/lib/components/notes/NoteEditor/Chat.svelte(+1 -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.
Add ability to set a global variable for stream response configuration.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
DEFAULT_CHAT_STREAM_RESPONSEthat allows administrators to control the default streaming behavior for chat responses across the entire Open WebUI deployment. This feature provides deployment-level control while still allowing individual users to override the setting in their personal preferences.Motivation: Organizations may want to disable streaming by default for various reasons including performance optimization, compliance requirements, or user preference policies. This change enables administrators to set a system-wide default without requiring each user to manually configure their settings.
Impact: This is a backward-compatible addition. The default value is
True, maintaining existing streaming behavior. Users can still override this setting in their individual chat settings (Settings > General > Advanced Parameters > Stream Chat Response).Added
DEFAULT_CHAT_STREAM_RESPONSE- Controls the default streaming behavior for chat responsesTrue(enable streaming, default) orFalse(disable streaming)DEFAULT_CHAT_STREAM_RESPONSEas aPersistentConfiginbackend/open_webui/config.pybackend/open_webui/main.pyapp state/api/config)src/lib/components/chat/Chat.svelteto check global config before hardcoded defaultsrc/lib/components/notes/NoteEditor.svelteto respect global streaming configsrc/lib/components/notes/NoteEditor/Chat.svelteto respect global streaming config.env.exampleSTREAMING_CONFIG.mdwith comprehensive usage guideChanged
DEFAULT_CHAT_STREAM_RESPONSE) ← NEWtrue)Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Configuration Priority:
The streaming behavior is determined by the following priority chain (highest to lowest):
DEFAULT_CHAT_STREAM_RESPONSEenvironment variabletrueUse Cases:
Testing Performed:
DEFAULT_CHAT_STREAM_RESPONSE=Truemaintains existing streaming behaviorDEFAULT_CHAT_STREAM_RESPONSE=Falsedisables streaming by defaultRelated Files:
backend/open_webui/config.py- Config definitionbackend/open_webui/main.py- App state integrationsrc/lib/components/chat/Chat.svelte- Main chat componentsrc/lib/components/notes/NoteEditor.svelte- Notes editorsrc/lib/components/notes/NoteEditor/Chat.svelte- Notes chat.env.example- DocumentationSTREAMING_CONFIG.md- Comprehensive guideExample Usage:
Docker Compose:
Docker Run:
Kubernetes:
Screenshots or Videos
The feature works at the configuration level and doesn't change the UI. The streaming behavior changes based on the environment variable:
With
DEFAULT_CHAT_STREAM_RESPONSE=True(default):With
DEFAULT_CHAT_STREAM_RESPONSE=False:Users can still override this in Settings > General > Advanced Parameters > Stream Chat Response (On/Off/Default).
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.