Skip to content

Commit d95f533

Browse files
authored
Merge pull request open-webui#19729 from open-webui/dev
0.6.42
2 parents 6f1486f + de97f79 commit d95f533

File tree

283 files changed

+9500
-4588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+9500
-4588
lines changed

.github/workflows/deploy-to-hf-spaces.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ jobs:
5757
git lfs install
5858
git lfs track "*.ttf"
5959
git lfs track "*.jpg"
60-
rm demo.gif
60+
rm demo.png
61+
rm banner.png
6162
git add .
6263
git commit -m "GitHub deploy: ${{ github.sha }}"
6364
git push --force https://open-webui:${HF_TOKEN}@huggingface.co/spaces/open-webui/open-webui main

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ pnpm-lock.yaml
33
package-lock.json
44
yarn.lock
55

6-
kubernetes/
7-
86
# Copy of .gitignore
97
.DS_Store
108
node_modules

CHANGELOG.md

Lines changed: 104 additions & 0 deletions
Large diffs are not rendered by default.

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ ARG USE_RERANKING_MODEL
5555
ARG UID
5656
ARG GID
5757

58+
# Python settings
59+
ENV PYTHONUNBUFFERED=1
60+
5861
## Basis ##
5962
ENV ENV=prod \
6063
PORT=8080 \

INSTALLATION.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2023-2025 Timothy Jaeryang Baek (Open WebUI)
1+
Copyright (c) 2023- Open WebUI Inc. [Created by Timothy Jaeryang Baek]
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
[![Discord](https://img.shields.io/badge/Discord-Open_WebUI-blue?logo=discord&logoColor=white)](https://discord.gg/5rJgQTnV4s)
1111
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/tjbck)
1212

13+
![Open WebUI Banner](./banner.png)
14+
1315
**Open WebUI is an [extensible](https://docs.openwebui.com/features/plugin/), feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline.** It supports various LLM runners like **Ollama** and **OpenAI-compatible APIs**, with **built-in inference engine** for RAG, making it a **powerful AI deployment solution**.
1416

1517
Passionate about open-source AI? [Join our team →](https://careers.openwebui.com/)
1618

17-
![Open WebUI Demo](./demo.gif)
19+
![Open WebUI Demo](./demo.png)
1820

1921
> [!TIP]
2022
> **Looking for an [Enterprise Plan](https://docs.openwebui.com/enterprise)?****[Speak with Our Sales Team Today!](https://docs.openwebui.com/enterprise)**
@@ -188,14 +190,6 @@ docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=
188190

189191
### Keeping Your Docker Installation Up-to-Date
190192

191-
In case you want to update your local Docker installation to the latest version, you can do it with [Watchtower](https://containrrr.dev/watchtower/):
192-
193-
```bash
194-
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
195-
```
196-
197-
In the last part of the command, replace `open-webui` with your container name if it is different.
198-
199193
Check our Updating Guide available in our [Open WebUI Documentation](https://docs.openwebui.com/getting-started/updating).
200194

201195
### Using the Dev Branch 🌙

backend/open_webui/config.py

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,12 @@ def __getattr__(self, key):
629629
== "true"
630630
)
631631

632+
OAUTH_AUDIENCE = PersistentConfig(
633+
"OAUTH_AUDIENCE",
634+
"oauth.audience",
635+
os.environ.get("OAUTH_AUDIENCE", ""),
636+
)
637+
632638

633639
def load_oauth_providers():
634640
OAUTH_PROVIDERS.clear()
@@ -1300,7 +1306,7 @@ def feishu_oauth_register(oauth: OAuth):
13001306

13011307
USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ALLOW_SHARING = (
13021308
os.environ.get(
1303-
"USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ALLOW_PUBLIC_SHARING", "False"
1309+
"USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ALLOW_SHARING", "False"
13041310
).lower()
13051311
== "true"
13061312
)
@@ -1339,8 +1345,7 @@ def feishu_oauth_register(oauth: OAuth):
13391345

13401346

13411347
USER_PERMISSIONS_NOTES_ALLOW_SHARING = (
1342-
os.environ.get("USER_PERMISSIONS_NOTES_ALLOW_PUBLIC_SHARING", "False").lower()
1343-
== "true"
1348+
os.environ.get("USER_PERMISSIONS_NOTES_ALLOW_SHARING", "False").lower() == "true"
13441349
)
13451350

13461351
USER_PERMISSIONS_NOTES_ALLOW_PUBLIC_SHARING = (
@@ -2518,6 +2523,12 @@ class BannerModel(BaseModel):
25182523
os.environ.get("MINERU_API_URL", "http://localhost:8000"),
25192524
)
25202525

2526+
MINERU_API_TIMEOUT = PersistentConfig(
2527+
"MINERU_API_TIMEOUT",
2528+
"rag.mineru_api_timeout",
2529+
os.environ.get("MINERU_API_TIMEOUT", "300"),
2530+
)
2531+
25212532
MINERU_API_KEY = PersistentConfig(
25222533
"MINERU_API_KEY",
25232534
"rag.mineru_api_key",
@@ -2791,6 +2802,12 @@ class BannerModel(BaseModel):
27912802
os.environ.get("RAG_EXTERNAL_RERANKER_API_KEY", ""),
27922803
)
27932804

2805+
RAG_EXTERNAL_RERANKER_TIMEOUT = PersistentConfig(
2806+
"RAG_EXTERNAL_RERANKER_TIMEOUT",
2807+
"rag.external_reranker_timeout",
2808+
os.environ.get("RAG_EXTERNAL_RERANKER_TIMEOUT", ""),
2809+
)
2810+
27942811

27952812
RAG_TEXT_SPLITTER = PersistentConfig(
27962813
"RAG_TEXT_SPLITTER",
@@ -2977,7 +2994,7 @@ class BannerModel(BaseModel):
29772994
WEB_SEARCH_CONCURRENT_REQUESTS = PersistentConfig(
29782995
"WEB_SEARCH_CONCURRENT_REQUESTS",
29792996
"rag.web.search.concurrent_requests",
2980-
int(os.getenv("WEB_SEARCH_CONCURRENT_REQUESTS", "10")),
2997+
int(os.getenv("WEB_SEARCH_CONCURRENT_REQUESTS", "0")),
29812998
)
29822999

29833000

@@ -2994,6 +3011,12 @@ class BannerModel(BaseModel):
29943011
int(os.getenv("WEB_LOADER_CONCURRENT_REQUESTS", "10")),
29953012
)
29963013

3014+
WEB_LOADER_TIMEOUT = PersistentConfig(
3015+
"WEB_LOADER_TIMEOUT",
3016+
"rag.web.loader.timeout",
3017+
os.getenv("WEB_LOADER_TIMEOUT", ""),
3018+
)
3019+
29973020

29983021
ENABLE_WEB_LOADER_SSL_VERIFICATION = PersistentConfig(
29993022
"ENABLE_WEB_LOADER_SSL_VERIFICATION",
@@ -3020,6 +3043,12 @@ class BannerModel(BaseModel):
30203043
os.getenv("SEARXNG_QUERY_URL", ""),
30213044
)
30223045

3046+
SEARXNG_LANGUAGE = PersistentConfig(
3047+
"SEARXNG_LANGUAGE",
3048+
"rag.web.search.searxng_language",
3049+
os.getenv("SEARXNG_LANGUAGE", "all"),
3050+
)
3051+
30233052
YACY_QUERY_URL = PersistentConfig(
30243053
"YACY_QUERY_URL",
30253054
"rag.web.search.yacy_query_url",
@@ -3450,10 +3479,16 @@ class BannerModel(BaseModel):
34503479
os.getenv("COMFYUI_WORKFLOW", COMFYUI_DEFAULT_WORKFLOW),
34513480
)
34523481

3482+
comfyui_workflow_nodes = os.getenv("COMFYUI_WORKFLOW_NODES", "")
3483+
try:
3484+
comfyui_workflow_nodes = json.loads(comfyui_workflow_nodes)
3485+
except json.JSONDecodeError:
3486+
comfyui_workflow_nodes = []
3487+
34533488
COMFYUI_WORKFLOW_NODES = PersistentConfig(
3454-
"COMFYUI_WORKFLOW",
3489+
"COMFYUI_WORKFLOW_NODES",
34553490
"image_generation.comfyui.nodes",
3456-
[],
3491+
comfyui_workflow_nodes,
34573492
)
34583493

34593494
IMAGES_OPENAI_API_BASE_URL = PersistentConfig(
@@ -3570,10 +3605,16 @@ class BannerModel(BaseModel):
35703605
os.getenv("IMAGES_EDIT_COMFYUI_WORKFLOW", ""),
35713606
)
35723607

3608+
images_edit_comfyui_workflow_nodes = os.getenv("IMAGES_EDIT_COMFYUI_WORKFLOW_NODES", "")
3609+
try:
3610+
images_edit_comfyui_workflow_nodes = json.loads(images_edit_comfyui_workflow_nodes)
3611+
except json.JSONDecodeError:
3612+
images_edit_comfyui_workflow_nodes = []
3613+
35733614
IMAGES_EDIT_COMFYUI_WORKFLOW_NODES = PersistentConfig(
35743615
"IMAGES_EDIT_COMFYUI_WORKFLOW_NODES",
35753616
"images.edit.comfyui.nodes",
3576-
[],
3617+
images_edit_comfyui_workflow_nodes,
35773618
)
35783619

35793620
####################################

backend/open_webui/env.py

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,6 @@
8585
log.exception(cuda_error)
8686
del cuda_error
8787

88-
log_sources = [
89-
"AUDIO",
90-
"COMFYUI",
91-
"CONFIG",
92-
"DB",
93-
"IMAGES",
94-
"MAIN",
95-
"MODELS",
96-
"OLLAMA",
97-
"OPENAI",
98-
"RAG",
99-
"WEBHOOK",
100-
"SOCKET",
101-
"OAUTH",
102-
]
103-
104-
SRC_LOG_LEVELS = {}
105-
106-
for source in log_sources:
107-
log_env_var = source + "_LOG_LEVEL"
108-
SRC_LOG_LEVELS[source] = os.environ.get(log_env_var, "").upper()
109-
if SRC_LOG_LEVELS[source] not in logging.getLevelNamesMapping():
110-
SRC_LOG_LEVELS[source] = GLOBAL_LOG_LEVEL
111-
log.info(f"{log_env_var}: {SRC_LOG_LEVELS[source]}")
112-
113-
log.setLevel(SRC_LOG_LEVELS["CONFIG"])
11488

11589
WEBUI_NAME = os.environ.get("WEBUI_NAME", "Open WebUI")
11690
if WEBUI_NAME != "Open WebUI":
@@ -364,6 +338,11 @@ def parse_section(section):
364338
except Exception:
365339
DATABASE_USER_ACTIVE_STATUS_UPDATE_INTERVAL = 0.0
366340

341+
# Enable public visibility of active user count (when disabled, only admins can see it)
342+
ENABLE_PUBLIC_ACTIVE_USERS_COUNT = (
343+
os.environ.get("ENABLE_PUBLIC_ACTIVE_USERS_COUNT", "True").lower() == "true"
344+
)
345+
367346
RESET_CONFIG_ON_START = (
368347
os.environ.get("RESET_CONFIG_ON_START", "False").lower() == "true"
369348
)
@@ -395,6 +374,13 @@ def parse_section(section):
395374
except ValueError:
396375
REDIS_SENTINEL_MAX_RETRY_COUNT = 2
397376

377+
378+
REDIS_SOCKET_CONNECT_TIMEOUT = os.environ.get("REDIS_SOCKET_CONNECT_TIMEOUT", "")
379+
try:
380+
REDIS_SOCKET_CONNECT_TIMEOUT = float(REDIS_SOCKET_CONNECT_TIMEOUT)
381+
except ValueError:
382+
REDIS_SOCKET_CONNECT_TIMEOUT = None
383+
398384
####################################
399385
# UVICORN WORKERS
400386
####################################
@@ -439,7 +425,13 @@ def parse_section(section):
439425
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).{8,}$",
440426
)
441427

442-
PASSWORD_VALIDATION_REGEX_PATTERN = re.compile(PASSWORD_VALIDATION_REGEX_PATTERN)
428+
try:
429+
PASSWORD_VALIDATION_REGEX_PATTERN = re.compile(PASSWORD_VALIDATION_REGEX_PATTERN)
430+
except Exception as e:
431+
log.error(f"Invalid PASSWORD_VALIDATION_REGEX_PATTERN: {e}")
432+
PASSWORD_VALIDATION_REGEX_PATTERN = re.compile(
433+
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).{8,}$"
434+
)
443435

444436

445437
BYPASS_MODEL_ACCESS_CONTROL = (
@@ -546,6 +538,10 @@ def parse_section(section):
546538
# MODELS
547539
####################################
548540

541+
ENABLE_CUSTOM_MODEL_FALLBACK = (
542+
os.environ.get("ENABLE_CUSTOM_MODEL_FALLBACK", "False").lower() == "true"
543+
)
544+
549545
MODELS_CACHE_TTL = os.environ.get("MODELS_CACHE_TTL", "1")
550546
if MODELS_CACHE_TTL == "":
551547
MODELS_CACHE_TTL = None
@@ -620,9 +616,16 @@ def parse_section(section):
620616
WEBSOCKET_MANAGER = os.environ.get("WEBSOCKET_MANAGER", "")
621617

622618
WEBSOCKET_REDIS_OPTIONS = os.environ.get("WEBSOCKET_REDIS_OPTIONS", "")
619+
620+
623621
if WEBSOCKET_REDIS_OPTIONS == "":
624-
log.debug("No WEBSOCKET_REDIS_OPTIONS provided, defaulting to None")
625-
WEBSOCKET_REDIS_OPTIONS = None
622+
if REDIS_SOCKET_CONNECT_TIMEOUT:
623+
WEBSOCKET_REDIS_OPTIONS = {
624+
"socket_connect_timeout": REDIS_SOCKET_CONNECT_TIMEOUT
625+
}
626+
else:
627+
log.debug("No WEBSOCKET_REDIS_OPTIONS provided, defaulting to None")
628+
WEBSOCKET_REDIS_OPTIONS = None
626629
else:
627630
try:
628631
WEBSOCKET_REDIS_OPTIONS = json.loads(WEBSOCKET_REDIS_OPTIONS)

backend/open_webui/functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from open_webui.utils.tools import get_tools
3838
from open_webui.utils.access_control import has_access
3939

40-
from open_webui.env import SRC_LOG_LEVELS, GLOBAL_LOG_LEVEL
40+
from open_webui.env import GLOBAL_LOG_LEVEL
4141

4242
from open_webui.utils.misc import (
4343
add_or_update_system_message,
@@ -54,7 +54,6 @@
5454

5555
logging.basicConfig(stream=sys.stdout, level=GLOBAL_LOG_LEVEL)
5656
log = logging.getLogger(__name__)
57-
log.setLevel(SRC_LOG_LEVELS["MAIN"])
5857

5958

6059
def get_function_module_by_id(request: Request, pipe_id: str):

0 commit comments

Comments
 (0)