Skip to content
Merged

Dev #263

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
319 commits
Select commit Hold shift + click to select a range
52c7339
refac
tjbck Jan 22, 2026
655420f
feat: ENABLE_OAUTH_TOKEN_EXCHANGE
tjbck Jan 23, 2026
46cf40e
refac
tjbck Jan 23, 2026
d2c695e
feat: add convert_output_to_messages for OR-aligned message building
tjbck Jan 23, 2026
78f856e
enh: quick prompt copy
tjbck Jan 23, 2026
90a057f
refac
tjbck Jan 23, 2026
0dc74a8
refac
tjbck Jan 23, 2026
db80dd2
feat: prompt history table
tjbck Jan 23, 2026
66daa15
wip: prompt history models
tjbck Jan 23, 2026
34773e7
wip: prompt history backend integration
tjbck Jan 23, 2026
0c79a56
feat: prompt history frontend
tjbck Jan 23, 2026
6ab7d54
refac
tjbck Jan 23, 2026
44da9c6
refac
tjbck Jan 23, 2026
dff0141
refac
tjbck Jan 23, 2026
5ad593e
refac: prompt endpoints
tjbck Jan 23, 2026
5510fa1
refac
tjbck Jan 23, 2026
8bf46dc
refac
tjbck Jan 23, 2026
6c76983
refac
tjbck Jan 23, 2026
b7e9992
refac
tjbck Jan 23, 2026
32810b4
refac
tjbck Jan 24, 2026
b1d5b3b
refac
tjbck Jan 24, 2026
1f205a8
refac
tjbck Jan 24, 2026
f199c48
refac
tjbck Jan 24, 2026
25fd342
Update retrieval.py (#20930)
Classic298 Jan 26, 2026
6359628
refac
tjbck Jan 26, 2026
4c8d4e6
enh: prompt tags
tjbck Jan 26, 2026
10ba2ac
refac
tjbck Jan 26, 2026
b272ca5
fix: remove invalid expunge call on Pydantic FileModel (#20931)
Classic298 Jan 26, 2026
82af218
Merge pull request #20945 from open-webui/prompt_versioning
tjbck Jan 26, 2026
533c7b2
i18n: Improve zh-TW Traditional Chinese translation (#20920)
PeterDaveHello Jan 26, 2026
c5c4aef
Yandex web search (#20922)
pelmennoteam Jan 26, 2026
4a55167
refac
tjbck Jan 26, 2026
683438b
refac
tjbck Jan 27, 2026
36766f1
refac: prompts pagination
tjbck Jan 27, 2026
fa859de
refac
tjbck Jan 27, 2026
57ec2aa
refac
tjbck Jan 27, 2026
d67fe02
Update translation.json (#20959)
Classic298 Jan 27, 2026
57a2024
refac
tjbck Jan 27, 2026
2c12278
perf: Debounce various Database Endpoints for less Database Queries a…
Classic298 Jan 27, 2026
33020d8
perf: parallelize image loading in image_edits endpoint (#20911)
sjhddh Jan 27, 2026
1719408
refac
tjbck Jan 27, 2026
934bebd
refac
tjbck Jan 27, 2026
ce50d9b
refac
tjbck Jan 27, 2026
8e2b0b6
enh: playground export
tjbck Jan 27, 2026
665f95e
refac
tjbck Jan 27, 2026
78f9050
chore(repo): archive
OrenZhang Jan 29, 2026
72f3301
add slovak translations (#21032)
tomasloksa Jan 29, 2026
567b077
REDIS_RECONNECT_DELAY as positive float for handle retry delay on tim…
ctolon Jan 29, 2026
1eaae9d
perf: eliminate redundant SELECT after UPDATE in users.py (#21011)
Classic298 Jan 29, 2026
5749f78
fix: reduce triple query to single fetch in model toggle (#21009)
Classic298 Jan 29, 2026
26a5d8f
refac
tjbck Jan 29, 2026
a10ac77
enh: manage shared chats
tjbck Jan 29, 2026
93ed4ae
enh: files data controls
tjbck Jan 29, 2026
bc90463
refac
tjbck Jan 29, 2026
6e18294
refac
tjbck Jan 29, 2026
c111fa0
fix: add lang="ts" to Svelte script tags using TypeScript syntax (#21…
Classic298 Jan 29, 2026
66359d5
fix: clean up all event listeners in +layout.svelte onMount (#20913)
sjhddh Jan 29, 2026
fa84ff5
I18n: improve Chinese translation (#20902)
ShirasawaSama Jan 29, 2026
96a9696
enh: admin models
tjbck Jan 29, 2026
e686554
fix: resolve N+1 query in SCIM group_to_scim user lookup (#21005)
Classic298 Jan 29, 2026
68e2578
perf: optimize database queries in functions, feedbacks, and groups (…
Classic298 Jan 29, 2026
baef422
perf: eliminate redundant query after memory update (#21013)
Classic298 Jan 29, 2026
ce8ed5b
feat(files): add shift+click quick delete to File Manager (#21044)
Classic298 Jan 29, 2026
f9ab66f
refac
tjbck Jan 29, 2026
44e36e5
refac
tjbck Jan 29, 2026
aac9812
perf: batch fetch filter functions to eliminate N+1 queries (#21018)
Classic298 Jan 29, 2026
a6ed0ef
refac
tjbck Jan 30, 2026
89f1546
fix 404 (#21047)
Classic298 Jan 30, 2026
ee27fd8
perf: replace double lookup with single JOIN in authenticate_user_by_…
Classic298 Jan 30, 2026
45d7486
refac
tjbck Jan 30, 2026
94302de
feat: images playground
tjbck Jan 30, 2026
ab5dfbd
refac
tjbck Jan 30, 2026
643c661
chore: Updates minor/patch versions for 21 Python backend dependencie…
Classic298 Jan 31, 2026
e5dbfc4
refac
tjbck Jan 31, 2026
1441d0d
refac
tjbck Jan 31, 2026
ee5fd12
refac
tjbck Jan 31, 2026
599cd2e
feat: analytics backend API with chat_message table
tjbck Feb 1, 2026
a4ad348
feat: analytics frontend dashboard
tjbck Feb 1, 2026
96f1063
refac
tjbck Feb 1, 2026
7bb3a82
refac
tjbck Feb 1, 2026
75e5a48
refac
tjbck Feb 1, 2026
3da4323
refac
tjbck Feb 1, 2026
679e56c
feat: token analytics
tjbck Feb 1, 2026
b2c2f1b
refac
tjbck Feb 1, 2026
ea9c58e
feat: experimental responses api support
tjbck Feb 2, 2026
6ffce4b
refac
tjbck Feb 2, 2026
6719558
refac
tjbck Feb 2, 2026
117c091
refac
tjbck Feb 2, 2026
c22bb4f
refac
tjbck Feb 2, 2026
767343d
refac
tjbck Feb 2, 2026
b0c5f7b
refac
tjbck Feb 2, 2026
60f2f8c
Update pyproject.toml (#21087)
Classic298 Feb 2, 2026
d938eb0
refac
tjbck Feb 2, 2026
3c0313f
refac
tjbck Feb 2, 2026
cfd3058
Merge branch 'dev' into chat-message-rebased
tjbck Feb 2, 2026
cda08aa
Merge pull request #21106 from open-webui/chat-message-rebased
tjbck Feb 2, 2026
527d48e
refac
tjbck Feb 2, 2026
654172d
fix: redis clustermode instrumentation
tremlin Nov 10, 2025
a2b9986
Merge pull request #21129 from alpha-pet/fix-redis-cluster-otel
tjbck Feb 3, 2026
a9e0462
feat: add keyboard shortcut for opening the model selector (#21130)
tremlin Feb 3, 2026
0a61666
refac
tjbck Feb 3, 2026
afc56b9
refac
tjbck Feb 3, 2026
4aacaeb
fix: Shortcut i18n (#21138)
EntropyYue Feb 3, 2026
ecf3fa2
refac
tjbck Feb 4, 2026
43c6846
refac
tjbck Feb 4, 2026
fe681ab
refac: tags
tjbck Feb 4, 2026
405dc26
refac
tjbck Feb 4, 2026
a1ea854
refac
tjbck Feb 4, 2026
6cd35b1
refac
tjbck Feb 4, 2026
6320a9a
refac
tjbck Feb 5, 2026
8b75d34
refac
tjbck Feb 5, 2026
020cb0d
refac
tjbck Feb 5, 2026
3ace758
refac
tjbck Feb 5, 2026
5669d10
refac
tjbck Feb 5, 2026
2cf2565
refac
tjbck Feb 5, 2026
e8a36f0
refac
tjbck Feb 5, 2026
68a1e87
enh: analytics model modal
tjbck Feb 5, 2026
0e60c75
refac
tjbck Feb 5, 2026
e62649f
enh: analytics
tjbck Feb 5, 2026
62750b8
feat: queue messages
tjbck Feb 5, 2026
d3f2cf7
refac
tjbck Feb 5, 2026
9ed8f50
fix: bundle NLTK punkt_tab in Docker image for airgapped environments…
Classic298 Feb 5, 2026
f751c0b
Update builtin.py (#21115)
Classic298 Feb 5, 2026
cac5dd1
fix: handle null data in model_response_handler (#21112)
silentoplayz Feb 5, 2026
2250368
I18n: improve Chinese translation (#21181)
ShirasawaSama Feb 5, 2026
6c0f886
refac
tjbck Feb 5, 2026
8e79b3d
refac
tjbck Feb 5, 2026
2c37dae
refac
tjbck Feb 5, 2026
a214ec4
fix
tjbck Feb 5, 2026
2628662
refac
tjbck Feb 6, 2026
b173704
refac
tjbck Feb 6, 2026
938d1b0
refac
tjbck Feb 6, 2026
2584542
fix: files settings save issue
tjbck Feb 6, 2026
7e79f8d
refac
tjbck Feb 6, 2026
284b97b
refac
tjbck Feb 6, 2026
9cf4d34
refac
tjbck Feb 6, 2026
73bb600
refac
tjbck Feb 6, 2026
494cf8b
fix (#21226)
Classic298 Feb 7, 2026
4fa6123
i18n: Add Latvian translation (#21234)
Edgaras0x4E Feb 7, 2026
691a04f
refac
tjbck Feb 7, 2026
690686f
refac
tjbck Feb 7, 2026
59b98ab
refac
tjbck Feb 7, 2026
9be85b6
refac: access control migration
tjbck Feb 8, 2026
4852227
refac
tjbck Feb 8, 2026
c3fa0f3
refac
tjbck Feb 8, 2026
fd97ae9
refac
tjbck Feb 8, 2026
2646091
refac
tjbck Feb 8, 2026
d193c14
refac
tjbck Feb 9, 2026
42763cb
enh: access grants table
tjbck Feb 9, 2026
0f78451
refac
tjbck Feb 9, 2026
9747b07
refac
tjbck Feb 9, 2026
b147616
refac
tjbck Feb 9, 2026
aa8c295
refac
tjbck Feb 9, 2026
3ae44d1
refac
tjbck Feb 9, 2026
e2d09ac
refac
tjbck Feb 9, 2026
65904b8
i18n: Updated Irish translation (#21253)
aindriu80 Feb 9, 2026
f7406ff
refac
tjbck Feb 9, 2026
3c7f9aa
refac
tjbck Feb 9, 2026
68c7729
refac
tjbck Feb 9, 2026
48a0abb
Merge pull request #21277 from open-webui/acl
tjbck Feb 9, 2026
0a44d80
refac
tjbck Feb 9, 2026
1034b74
refac
tjbck Feb 9, 2026
c2f5cb5
refac
tjbck Feb 9, 2026
e3e4e1d
fix: handle Gboard clipboard strip multi-line paste via beforeinput (…
Algorithm5838 Feb 9, 2026
55169e6
chore: Dep bump (#21261)
Classic298 Feb 9, 2026
9b1fd86
fix: use keyword argument for IndicesClient.refresh() for opensearch-…
veeceey Feb 9, 2026
f236192
fix: resolve N+1 query in knowledge batch file add (#21006)
Classic298 Feb 9, 2026
3567054
refac
tjbck Feb 10, 2026
97afe3b
enh: skip chat notifications on other devices if temporary chat (#21292)
Classic298 Feb 10, 2026
8fd5c06
refac
tjbck Feb 10, 2026
cd31b83
refac
tjbck Feb 10, 2026
0044902
refac
tjbck Feb 10, 2026
c259c87
refac
tjbck Feb 10, 2026
a73cdf4
refac: dmr fallback for ollama
tjbck Feb 10, 2026
e3a8257
refac
tjbck Feb 10, 2026
4aedfdc
refac
tjbck Feb 10, 2026
30f7267
refac
tjbck Feb 10, 2026
3e56261
refac
tjbck Feb 11, 2026
4331029
refac
tjbck Feb 11, 2026
ba18d62
refac
tjbck Feb 11, 2026
2f584c9
refac
tjbck Feb 11, 2026
3fabc08
feat: skills migration
tjbck Feb 11, 2026
c220788
feat: skills backend
tjbck Feb 11, 2026
a38ad8f
refac
tjbck Feb 11, 2026
1973115
feat: skills frontend
tjbck Feb 11, 2026
27944cf
refac
tjbck Feb 11, 2026
46aa54b
refac
tjbck Feb 11, 2026
f7c5965
feat: $ skills mention
tjbck Feb 11, 2026
64c37ab
refac
tjbck Feb 11, 2026
c8cbdc8
refac
tjbck Feb 11, 2026
e5035ea
refac
tjbck Feb 11, 2026
9b925a1
refac
tjbck Feb 11, 2026
5c1c9a4
Merge pull request #21312 from open-webui/skills
tjbck Feb 11, 2026
773787c
refac
tjbck Feb 11, 2026
89fddcc
update french translation.json (#21295)
schneider-f Feb 11, 2026
f376d4f
chore: format
tjbck Feb 11, 2026
ab20745
Enable Rich UI embed support for action functions (#21294)
Classic298 Feb 11, 2026
60ada21
refac
tjbck Feb 11, 2026
96c07f4
refac
tjbck Feb 11, 2026
97331bf
refac
tjbck Feb 11, 2026
9b30e8f
refac
tjbck Feb 11, 2026
4e0cb88
refac: audio timeout
tjbck Feb 11, 2026
ce3a615
perf: cache OpenAI config reads to avoid redundant Redis lookups in /…
tremlin Feb 11, 2026
390d766
fix: don't pollute model text context with encoded images (#20916)
tremlin Feb 12, 2026
0bebb26
fix: decode HTML entities in tool call results for multi-turn convers…
Classic298 Feb 12, 2026
0da5714
refac
tjbck Feb 12, 2026
dddac2b
refac
tjbck Feb 12, 2026
d02e826
Fix idle in transaction leaks in Open WebUI (#20868)
Classic298 Feb 12, 2026
2372b70
refac: async pipelines requests
tjbck Feb 12, 2026
a4281f6
refac: ldap
tjbck Feb 12, 2026
efe5416
fix: reduce TTFT by caching model lookups in chat completion (#20886)
Classic298 Feb 12, 2026
ccb71a7
refac
tjbck Feb 12, 2026
4d024c9
refac
tjbck Feb 12, 2026
a408085
refac
tjbck Feb 12, 2026
05ae44b
refac
tjbck Feb 12, 2026
da46c1b
Update translation.json (#21324)
Classic298 Feb 12, 2026
c8bf390
i18n: Update catalan translation (#21320)
aleixdorca Feb 12, 2026
6335054
i18n: improve zh-CN translation (#21319)
EntropyYue Feb 12, 2026
423d8b1
refac
tjbck Feb 12, 2026
531ac70
refac
tjbck Feb 12, 2026
c6af296
add message id (#21214)
Classic298 Feb 12, 2026
8cf32ae
fix: prevent worker death during document upload by using run_corouti…
Classic298 Feb 12, 2026
c653e4e
refac
tjbck Feb 12, 2026
0dcbd05
refac
tjbck Feb 12, 2026
e8499cc
fix: pass chat_id to internal task calls for consistent function cont…
Classic298 Feb 12, 2026
2ffd8d9
refac
tjbck Feb 12, 2026
ea4ef28
init (#20883)
Classic298 Feb 12, 2026
8919d8a
refac
tjbck Feb 12, 2026
3238d94
refac
tjbck Feb 12, 2026
2a11175
chore: format
tjbck Feb 12, 2026
87d0c11
Update CHANGELOG.md (#20594)
Classic298 Feb 12, 2026
5291b3d
refac
tjbck Feb 12, 2026
c3dc5d5
refac
tjbck Feb 12, 2026
9468d92
refac
tjbck Feb 12, 2026
850a864
refac
tjbck Feb 12, 2026
0e64b31
refac
tjbck Feb 12, 2026
bb40724
refac
tjbck Feb 12, 2026
f7af3f0
refac
tjbck Feb 12, 2026
59afbd6
refac
tjbck Feb 12, 2026
5297dce
chore: format
tjbck Feb 12, 2026
9fc1658
refac
tjbck Feb 12, 2026
7a7a257
Merge pull request #21314 from open-webui/dev
tjbck Feb 12, 2026
00405dd
chore(repo): unarchive
Feb 13, 2026
f4b9055
Merge branch 'openwebui_main' into dev
Feb 13, 2026
096324b
refactor(languages): remove traditional Chinese entry
OrenZhang Feb 13, 2026
1d2567f
style(credits, misc, openai): format code for readability
OrenZhang Feb 13, 2026
63ae56b
refactor(auths): improve code readability and structure
OrenZhang Feb 13, 2026
ef3e523
refactor(users, auths, ollama, openai, misc): improve code structure …
OrenZhang Feb 13, 2026
85b0f66
feat(translation): add new entries for credit and redemption codes
OrenZhang Feb 13, 2026
1d04f08
fix(model-editor): allow decimal values for model price setting
OrenZhang Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions CHANGELOG_EXTRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0.2] - 2026.02.13

### Fixed

- 修复模型价格设置不能为小数的问题

## [0.8.0.1] - 2026.02.13

### Changed

- 合并官方 0.8.0 改动

## [0.7.2.5] - 2026.01.28

### Changed
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
git build-essential pandoc gcc netcat-openbsd curl jq \
python3-dev \
ffmpeg libsm6 libxext6 \
ffmpeg libsm6 libxext6 zstd \
&& rm -rf /var/lib/apt/lists/*

# install python dependencies
Expand All @@ -144,6 +144,7 @@ RUN pip3 install --no-cache-dir uv && \
python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ.get('AUXILIARY_EMBEDDING_MODEL', 'TaylorAI/bge-micro-v2'), device='cpu')" && \
python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
python -c "import os; import tiktoken; tiktoken.get_encoding(os.environ['TIKTOKEN_ENCODING_NAME'])"; \
python -c "import nltk; nltk.download('punkt_tab')"; \
else \
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir && \
uv pip install --system -r requirements.txt --no-cache-dir && \
Expand All @@ -152,6 +153,7 @@ RUN pip3 install --no-cache-dir uv && \
python -c "import os; from sentence_transformers import SentenceTransformer; SentenceTransformer(os.environ.get('AUXILIARY_EMBEDDING_MODEL', 'TaylorAI/bge-micro-v2'), device='cpu')" && \
python -c "import os; from faster_whisper import WhisperModel; WhisperModel(os.environ['WHISPER_MODEL'], device='cpu', compute_type='int8', download_root=os.environ['WHISPER_MODEL_DIR'])"; \
python -c "import os; import tiktoken; tiktoken.get_encoding(os.environ['TIKTOKEN_ENCODING_NAME'])"; \
python -c "import nltk; nltk.download('punkt_tab')"; \
fi; \
fi; \
mkdir -p /app/backend/data && chown -R $UID:$GID /app/backend/data/ && \
Expand Down
88 changes: 85 additions & 3 deletions backend/open_webui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import logging
import os
import shutil
import socket
import base64
from concurrent.futures import ThreadPoolExecutor
import redis

from datetime import datetime
Expand Down Expand Up @@ -237,16 +239,16 @@ def __setattr__(self, key, value):
self._state[key].value = value
self._state[key].save()

if self._redis:
if self._redis and ENABLE_PERSISTENT_CONFIG:
redis_key = f"{self._redis_key_prefix}:config:{key}"
self._redis.set(redis_key, json.dumps(self._state[key].value))

def __getattr__(self, key):
if key not in self._state:
raise AttributeError(f"Config key '{key}' not found")

# If Redis is available, check for an updated value
if self._redis:
# If Redis is available and persistent config is enabled, check for an updated value
if self._redis and ENABLE_PERSISTENT_CONFIG:
redis_key = f"{self._redis_key_prefix}:config:{key}"
redis_value = self._redis.get(redis_key)

Expand Down Expand Up @@ -950,6 +952,40 @@ def feishu_oauth_register(oauth: OAuth):
elif K8S_FLAG:
OLLAMA_BASE_URL = "http://ollama-service.open-webui.svc.cluster.local:11434"


def _resolve_ollama_base_url(url: str) -> str:
"""If the default Ollama port (11434) is unreachable, try the fallback port (12434)."""

def reachable(host: str, port: int) -> bool:
try:
with socket.create_connection((host, port), timeout=1.0):
return True
except (OSError, TimeoutError):
return False

host = urlparse(url).hostname or "localhost"

with ThreadPoolExecutor(max_workers=2) as pool:
default = pool.submit(reachable, host, 11434)
fallback = pool.submit(reachable, host, 12434)

if not default.result() and fallback.result():
url = url.replace(":11434", ":12434")
log.info(f"Ollama port 11434 unreachable on {host}, falling back to 12434")
elif not default.result():
log.info(f"Ollama ports 11434 and 12434 both unreachable on {host}")

return url


# Auto-resolve Ollama port when no explicit URL was provided by the user.
# The Dockerfile default is "/ollama" which the block above rewrites to :11434.
if os.environ.get("OLLAMA_BASE_URL", "") in ("", "/ollama") and not os.environ.get(
"OLLAMA_BASE_URLS", ""
):
OLLAMA_BASE_URL = _resolve_ollama_base_url(OLLAMA_BASE_URL)


OLLAMA_BASE_URLS = os.environ.get("OLLAMA_BASE_URLS", "")
OLLAMA_BASE_URLS = OLLAMA_BASE_URLS if OLLAMA_BASE_URLS != "" else OLLAMA_BASE_URL

Expand Down Expand Up @@ -1234,6 +1270,11 @@ def feishu_oauth_register(oauth: OAuth):
os.environ.get("USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS", "False").lower() == "true"
)

USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS = (
os.environ.get("USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS", "False").lower()
== "true"
)

USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT = (
os.environ.get("USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT", "False").lower()
== "true"
Expand Down Expand Up @@ -1448,6 +1489,7 @@ def feishu_oauth_register(oauth: OAuth):
"knowledge": USER_PERMISSIONS_WORKSPACE_KNOWLEDGE_ACCESS,
"prompts": USER_PERMISSIONS_WORKSPACE_PROMPTS_ACCESS,
"tools": USER_PERMISSIONS_WORKSPACE_TOOLS_ACCESS,
"skills": USER_PERMISSIONS_WORKSPACE_SKILLS_ACCESS,
"models_import": USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT,
"models_export": USER_PERMISSIONS_WORKSPACE_MODELS_EXPORT,
"prompts_import": USER_PERMISSIONS_WORKSPACE_PROMPTS_IMPORT,
Expand Down Expand Up @@ -2195,9 +2237,15 @@ class BannerModel(BaseModel):
QDRANT_COLLECTION_PREFIX = os.environ.get("QDRANT_COLLECTION_PREFIX", "open-webui")

WEAVIATE_HTTP_HOST = os.environ.get("WEAVIATE_HTTP_HOST", "")
WEAVIATE_GRPC_HOST = os.environ.get("WEAVIATE_GRPC_HOST", "")
WEAVIATE_HTTP_PORT = int(os.environ.get("WEAVIATE_HTTP_PORT", "8080"))
WEAVIATE_GRPC_PORT = int(os.environ.get("WEAVIATE_GRPC_PORT", "50051"))
WEAVIATE_API_KEY = os.environ.get("WEAVIATE_API_KEY")
WEAVIATE_HTTP_SECURE = os.environ.get("WEAVIATE_HTTP_SECURE", "false").lower() == "true"
WEAVIATE_GRPC_SECURE = os.environ.get("WEAVIATE_GRPC_SECURE", "false").lower() == "true"
WEAVIATE_SKIP_INIT_CHECKS = (
os.environ.get("WEAVIATE_SKIP_INIT_CHECKS", "false").lower() == "true"
)

# OpenSearch
OPENSEARCH_URI = os.environ.get("OPENSEARCH_URI", "https://localhost:9200")
Expand Down Expand Up @@ -2749,6 +2797,12 @@ class BannerModel(BaseModel):
os.environ.get("PDF_EXTRACT_IMAGES", "False").lower() == "true",
)

PDF_LOADER_MODE = PersistentConfig(
"PDF_LOADER_MODE",
"rag.pdf_loader_mode",
os.environ.get("PDF_LOADER_MODE", "page"),
)

RAG_EMBEDDING_MODEL = PersistentConfig(
"RAG_EMBEDDING_MODEL",
"rag.embedding_model",
Expand Down Expand Up @@ -3330,6 +3384,24 @@ class BannerModel(BaseModel):
os.environ.get("EXTERNAL_WEB_LOADER_API_KEY", ""),
)

YANDEX_WEB_SEARCH_URL = PersistentConfig(
"YANDEX_WEB_SEARCH_URL",
"rag.web.search.yandex_web_search_url",
os.environ.get("YANDEX_WEB_SEARCH_URL", ""),
)

YANDEX_WEB_SEARCH_API_KEY = PersistentConfig(
"YANDEX_WEB_SEARCH_API_KEY",
"rag.web.search.yandex_web_search_api_key",
os.environ.get("YANDEX_WEB_SEARCH_API_KEY", ""),
)

YANDEX_WEB_SEARCH_CONFIG = PersistentConfig(
"YANDEX_WEB_SEARCH_CONFIG",
"rag.web.search.yandex_web_search_config",
os.environ.get("YANDEX_WEB_SEARCH_CONFIG", ""),
)

####################################
# Images
####################################
Expand All @@ -3352,6 +3424,16 @@ class BannerModel(BaseModel):
os.getenv("IMAGE_GENERATION_MODEL", ""),
)

# Regex pattern for models that support IMAGE_SIZE = "auto".
IMAGE_AUTO_SIZE_MODELS_REGEX_PATTERN = os.getenv(
"IMAGE_AUTO_SIZE_MODELS_REGEX_PATTERN", "^gpt-image"
)

# Regex pattern for models that return URLs instead of base64 data.
IMAGE_URL_RESPONSE_MODELS_REGEX_PATTERN = os.getenv(
"IMAGE_URL_RESPONSE_MODELS_REGEX_PATTERN", "^gpt-image"
)

IMAGE_SIZE = PersistentConfig(
"IMAGE_SIZE", "image_generation.size", os.getenv("IMAGE_SIZE", "512x512")
)
Expand Down
69 changes: 62 additions & 7 deletions backend/open_webui/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,35 @@ def parse_section(section):
os.environ.get("ENABLE_FORWARD_USER_INFO_HEADERS", "False").lower() == "true"
)

# Header names for user info forwarding (customizable via environment variables)
FORWARD_USER_INFO_HEADER_USER_NAME = os.environ.get(
"FORWARD_USER_INFO_HEADER_USER_NAME", "X-OpenWebUI-User-Name"
)
FORWARD_USER_INFO_HEADER_USER_ID = os.environ.get(
"FORWARD_USER_INFO_HEADER_USER_ID", "X-OpenWebUI-User-Id"
)
FORWARD_USER_INFO_HEADER_USER_EMAIL = os.environ.get(
"FORWARD_USER_INFO_HEADER_USER_EMAIL", "X-OpenWebUI-User-Email"
)
FORWARD_USER_INFO_HEADER_USER_ROLE = os.environ.get(
"FORWARD_USER_INFO_HEADER_USER_ROLE", "X-OpenWebUI-User-Role"
)

# Header name for chat ID forwarding (customizable via environment variable)
FORWARD_SESSION_INFO_HEADER_MESSAGE_ID = os.environ.get(
"FORWARD_SESSION_INFO_HEADER_MESSAGE_ID", "X-OpenWebUI-Message-Id"
)
FORWARD_SESSION_INFO_HEADER_CHAT_ID = os.environ.get(
"FORWARD_SESSION_INFO_HEADER_CHAT_ID", "X-OpenWebUI-Chat-Id"
)

# Experimental feature, may be removed in future
ENABLE_STAR_SESSIONS_MIDDLEWARE = (
os.environ.get("ENABLE_STAR_SESSIONS_MIDDLEWARE", "False").lower() == "true"
)

ENABLE_EASTER_EGGS = os.environ.get("ENABLE_EASTER_EGGS", "True").lower() == "true"

####################################
# WEBUI_BUILD_HASH
####################################
Expand Down Expand Up @@ -393,6 +417,18 @@ def parse_section(section):
except ValueError:
REDIS_SOCKET_CONNECT_TIMEOUT = None

REDIS_RECONNECT_DELAY = os.environ.get("REDIS_RECONNECT_DELAY", "")

if REDIS_RECONNECT_DELAY == "":
REDIS_RECONNECT_DELAY = None
else:
try:
REDIS_RECONNECT_DELAY = float(REDIS_RECONNECT_DELAY)
if REDIS_RECONNECT_DELAY < 0:
REDIS_RECONNECT_DELAY = None
except Exception:
REDIS_RECONNECT_DELAY = None

####################################
# UVICORN WORKERS
####################################
Expand Down Expand Up @@ -457,6 +493,8 @@ def parse_section(section):
r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).{8,}$"
)

PASSWORD_VALIDATION_HINT = os.environ.get("PASSWORD_VALIDATION_HINT", "")


BYPASS_MODEL_ACCESS_CONTROL = (
os.environ.get("BYPASS_MODEL_ACCESS_CONTROL", "False").lower() == "true"
Expand Down Expand Up @@ -521,6 +559,12 @@ def parse_section(section):
"OAUTH_SESSION_TOKEN_ENCRYPTION_KEY", WEBUI_SECRET_KEY
)

# Token Exchange Configuration
# Allows external apps to exchange OAuth tokens for OpenWebUI tokens
ENABLE_OAUTH_TOKEN_EXCHANGE = (
os.environ.get("ENABLE_OAUTH_TOKEN_EXCHANGE", "False").lower() == "true"
)

####################################
# SCIM Configuration
####################################
Expand All @@ -547,15 +591,11 @@ def parse_section(section):

pk = None
if LICENSE_PUBLIC_KEY:
pk = serialization.load_pem_public_key(
f"""
pk = serialization.load_pem_public_key(f"""
-----BEGIN PUBLIC KEY-----
{LICENSE_PUBLIC_KEY}
-----END PUBLIC KEY-----
""".encode(
"utf-8"
)
)
""".encode("utf-8"))


####################################
Expand Down Expand Up @@ -675,7 +715,11 @@ def parse_section(section):
os.environ.get("WEBSOCKET_SERVER_LOGGING", "False").lower() == "true"
)
WEBSOCKET_SERVER_ENGINEIO_LOGGING = (
os.environ.get("WEBSOCKET_SERVER_LOGGING", "False").lower() == "true"
os.environ.get(
"WEBSOCKET_SERVER_ENGINEIO_LOGGING",
os.environ.get("WEBSOCKET_SERVER_LOGGING", "False"),
).lower()
== "true"
)
WEBSOCKET_SERVER_PING_TIMEOUT = os.environ.get("WEBSOCKET_SERVER_PING_TIMEOUT", "20")
try:
Expand Down Expand Up @@ -745,6 +789,17 @@ def parse_section(section):
)


RAG_EMBEDDING_TIMEOUT = os.environ.get("RAG_EMBEDDING_TIMEOUT", "")

if RAG_EMBEDDING_TIMEOUT == "":
RAG_EMBEDDING_TIMEOUT = None
else:
try:
RAG_EMBEDDING_TIMEOUT = int(RAG_EMBEDDING_TIMEOUT)
except Exception:
RAG_EMBEDDING_TIMEOUT = None


####################################
# SENTENCE TRANSFORMERS
####################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
1 change: 0 additions & 1 deletion backend/open_webui/internal/migrations/004_add_archived.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
1 change: 0 additions & 1 deletion backend/open_webui/internal/migrations/008_add_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import peewee as pw
from peewee_migrate import Migrator


with suppress(ImportError):
import playhouse.postgres_ext as pw_pext

Expand Down
Loading
Loading