Skip to content
Merged

Dev #270

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
61bbb99
fix: replace bare except with Exception in oauth.py (#22420)
gambletan Mar 8, 2026
f419830
# i18n: (pt-BR) add translations for newly added UI items + consisten…
joaoback Mar 8, 2026
e1d04be
i18n: (pt-BR) add translations for newly added UI items + consistency…
joaoback Mar 8, 2026
abe865f
i18n : Updated ms-MY Malay (Bahasa Malaysia) Language (#22450)
amirsubhi Mar 8, 2026
2c35bdb
fix: replace bare string raises with proper exception types (#22446)
alvinttang Mar 8, 2026
67e26fd
refac
tjbck Mar 8, 2026
7103206
refac
tjbck Mar 8, 2026
63a0bef
fix: add missing opentelemetry-instrumentation-system-metrics depende…
Classic298 Mar 8, 2026
bbbe2b6
fix: use static month names in getTimeRange to prevent OS locale leak…
Classic298 Mar 8, 2026
f78b238
fix: prevent pipeline filter from corrupting payload on HTTP error (#…
alvinttang Mar 8, 2026
3e513be
fix: prevent TypeError in Teams webhook when user data is missing (#2…
alvinttang Mar 8, 2026
7a3c5c0
fix: replace bare except with except Exception in main.py (#22423)
gambletan Mar 8, 2026
138c4cb
fix: filter out internal tool methods starting with underscore (#22408)
Fu-Jie Mar 8, 2026
a97f5ad
fix: URL-encode OAuth error message in redirect URL (#22415)
gambletan Mar 8, 2026
7aa7bbc
fix: correct Azure TTS locale extraction for SSML xml:lang (#22443)
alvinttang Mar 8, 2026
3e95204
refac
tjbck Mar 8, 2026
caf3362
fix: add missing group_id filter to analytics token usage query (#22167)
Classic298 Mar 8, 2026
265d1b2
Add support for mariadb-vector as backing vector DB (#21931)
seulement55 Mar 8, 2026
d513eb8
Update Citations.svelte (#21897)
fama-05 Mar 8, 2026
c977674
refac/fix
tjbck Mar 8, 2026
defeddf
fix: display image thumbnails in pending message queue
tjbck Mar 8, 2026
9d8f590
feat: support pipe filters for per-message content truncation in task…
tjbck Mar 8, 2026
3f350f8
refac
tjbck Mar 8, 2026
2cb2836
refac
tjbck Mar 8, 2026
352391f
chore: format
tjbck Mar 8, 2026
1364df0
refac
tjbck Mar 8, 2026
0bfacca
refac
tjbck Mar 8, 2026
c3e1d2d
refac
tjbck Mar 8, 2026
61366cb
refac
tjbck Mar 8, 2026
cb73257
chore: Changelog updates (#22460)
Classic298 Mar 8, 2026
97cc947
chore: bump
tjbck Mar 9, 2026
c6a1469
refac
tjbck Mar 9, 2026
e4e69a1
Merge pull request #22469 from open-webui/dev
tjbck Mar 9, 2026
37a4532
Merge remote-tracking branch 'openwebui/main' into dev
OrenZhang Mar 9, 2026
afd09b0
chore(repo): merge from remote
OrenZhang Mar 9, 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
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ 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.10] - 2026-03-08

### Added

- 🔐 **Custom OIDC logout endpoint.** Administrators can now configure a custom OpenID Connect logout URL via OPENID_END_SESSION_ENDPOINT, enabling logout functionality for OIDC providers that require custom endpoints like AWS Cognito. [Commit](https://github.com/open-webui/open-webui/commit/3f350f865920daf2844769a758b2d2e6a7ee3efa)
- 🗄️ **MariaDB Vector community support.** Added MariaDB Vector as a new vector database backend, enabling deployments with VECTOR_DB=mariadb-vector; supports cosine and euclidean distance strategies with configurable HNSW indexing. [#21931](https://github.com/open-webui/open-webui/pull/21931)
- 📝 **Task message truncation.** Chat messages sent to task models for title and tag generation can now be truncated using a filter in the prompt template, reducing token usage and processing time for long conversations. [#21499](https://github.com/open-webui/open-webui/issues/21499)
- 🔄 **General improvements.** Various improvements were implemented across the application to enhance performance, stability, and security.
- 🌐 Translations for Portuguese (Brazil), Spanish, and Malay were enhanced and expanded.

### Fixed

- 🔗 **Pipeline filter HTTP errors.** Fixed a bug where HTTP errors in pipeline inlet/outlet filters would silently corrupt the user's chat payload; errors are now properly raised before parsing the response. [#22445](https://github.com/open-webui/open-webui/pull/22445)
- 📚 **Knowledge file embedding updates.** Fixed a bug where updating knowledge files left old embeddings in the database, causing search results to include duplicate and stale data. [#20558](https://github.com/open-webui/open-webui/issues/20558)
- 📁 **Files list stability.** Fixed the files list ordering to use created_at with id as secondary sort, ensuring consistent ordering and preventing page crashes when managing many files. [#21879](https://github.com/open-webui/open-webui/issues/21879)
- 📨 **Teams webhook crash.** Fixed a TypeError crash in the Teams webhook handler when user data is missing from the event payload. [#22444](https://github.com/open-webui/open-webui/pull/22444)
- 🛠️ **Process shutdown handling.** Fixed bare except clauses in the main process that prevented clean shutdown; replaced with proper exception handling. [#22423](https://github.com/open-webui/open-webui/pull/22423)
- 🐳 **Docker deployment startup.** Docker deployments now start correctly; the missing OpenTelemetry system metrics dependency was added. [#22447](https://github.com/open-webui/open-webui/pull/22447), [#22401](https://github.com/open-webui/open-webui/issues/22401)
- 🛠️ **Tool access for non-admin users.** Fixed a NameError that prevented non-admin users from viewing tools; the missing has_access function is now properly imported. [#22393](https://github.com/open-webui/open-webui/issues/22393)
- 🔐 **OAuth error handling.** Fixed a bug where bare except clauses silently caught SystemExit and KeyboardInterrupt, preventing clean process shutdown during OAuth authentication. [#22420](https://github.com/open-webui/open-webui/pull/22420)
- 🛠️ **Exception error messages.** Fixed three locations where incorrect exception raising caused confusing TypeError messages instead of proper error descriptions, making debugging much easier. [#22446](https://github.com/open-webui/open-webui/pull/22446)
- 📄 **YAML file processing.** Fixed an error when uploading YAML files with Docling enabled; YAML and YML files are now properly recognized as text files and processed correctly. [#22399](https://github.com/open-webui/open-webui/pull/22399), [#22263](https://github.com/open-webui/open-webui/issues/22263)
- 📅 **Time range month names.** Fixed month names in time range labels appearing in the wrong language when OS regional settings differ from browser language; month names now consistently display in English. [#22454](https://github.com/open-webui/open-webui/pull/22454)
- 🔐 **OAuth error URL encoding.** Fixed OAuth error messages with special characters causing malformed redirect URLs; error messages are now properly URL-encoded. [#22415](https://github.com/open-webui/open-webui/pull/22415)
- 🛠️ **Internal tool method filtering.** Tools no longer expose internal methods starting with underscore to the LLM, reducing clutter and improving accuracy. [#22408](https://github.com/open-webui/open-webui/pull/22408)
- 🔊 **Azure TTS locale extraction.** Fixed Azure text-to-speech using incomplete locale codes in SSML; now correctly uses full locale like "en-US" instead of just "en". [#22443](https://github.com/open-webui/open-webui/pull/22443)
- 🎤 **Azure speech transcription errors.** Improved Azure AI Speech error handling to display user-friendly messages instead of generic connection errors; empty transcripts, no language identified, and other Azure-specific errors now show clear descriptions. [#20485](https://github.com/open-webui/open-webui/issues/20485)
- 📊 **Analytics group filtering.** Fixed token usage analytics not being filtered by user group; the query now properly respects group filters like other analytics metrics. [#22167](https://github.com/open-webui/open-webui/pull/22167)
- 🔍 **Web search favicon fallback.** Fixed web search sources showing broken image icons when favicons couldn't be loaded from external sources; now falls back to the default Open WebUI favicon. [#21897](https://github.com/open-webui/open-webui/pull/21897)
- 🔄 **Custom model fallback.** Fixed custom model fallback not working when the base model is unavailable; the base model ID is now correctly retrieved from model info instead of empty params. [#22456](https://github.com/open-webui/open-webui/issues/22456)
- 🖼️ **Pending message image display.** Fixed images in queued messages appearing blank; image thumbnails are now properly displayed in the pending message queue. [#22256](https://github.com/open-webui/open-webui/issues/22256)
- 🛠️ **File metadata sanitization.** Fixed file uploads failing with JSON serialization errors when metadata contained non-serializable objects like callable functions; metadata is now sanitized before database insertion. [#20561](https://github.com/open-webui/open-webui/issues/20561)

## [0.8.9] - 2026-03-07

### Added
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG_EXTRA.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.10.1] - 2026.03.09

### Changed

- 合并官方 0.8.10 改动

## [0.8.9.1] - 2026.03.08

### Changed
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ RUN chown -R $UID:$GID /app $HOME
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git build-essential pandoc gcc netcat-openbsd curl jq \
libmariadb-dev \
python3-dev \
ffmpeg libsm6 libxext6 zstd \
&& rm -rf /var/lib/apt/lists/*
Expand Down
90 changes: 88 additions & 2 deletions backend/open_webui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ def __getattr__(self, key):
os.environ.get("OPENID_PROVIDER_URL", ""),
)

OPENID_END_SESSION_ENDPOINT = PersistentConfig(
"OPENID_END_SESSION_ENDPOINT",
"oauth.oidc.end_session_endpoint",
os.environ.get("OPENID_END_SESSION_ENDPOINT", ""),
)

OPENID_REDIRECT_URI = PersistentConfig(
"OPENID_REDIRECT_URI",
"oauth.oidc.redirect_uri",
Expand Down Expand Up @@ -821,13 +827,18 @@ def feishu_oauth_register(oauth: OAuth):
if FEISHU_CLIENT_ID.value:
configured_providers.append("Feishu")

if configured_providers and not OPENID_PROVIDER_URL.value:
if (
configured_providers
and not OPENID_PROVIDER_URL.value
and not OPENID_END_SESSION_ENDPOINT.value
):
provider_list = ", ".join(configured_providers)
log.warning(
f"⚠️ OAuth providers configured ({provider_list}) but OPENID_PROVIDER_URL not set - logout will not work!"
)
log.warning(
f"Set OPENID_PROVIDER_URL to your OAuth provider's OpenID Connect discovery endpoint to fix logout functionality."
f"Set OPENID_PROVIDER_URL to your OAuth provider's OpenID Connect discovery endpoint,"
f" or set OPENID_END_SESSION_ENDPOINT to a custom logout URL to fix logout functionality."
)


Expand Down Expand Up @@ -2311,6 +2322,81 @@ class BannerModel(BaseModel):
CHROMA_HTTP_SSL = os.environ.get("CHROMA_HTTP_SSL", "false").lower() == "true"
# this uses the model defined in the Dockerfile ENV variable. If you dont use docker or docker based deployments such as k8s, the default embedding model will be used (sentence-transformers/all-MiniLM-L6-v2)


# MariaDB Vector (mariadb-vector)
MARIADB_VECTOR_DB_URL = os.environ.get("MARIADB_VECTOR_DB_URL", "").strip()

MARIADB_VECTOR_INITIALIZE_MAX_VECTOR_LENGTH = int(
os.environ.get("MARIADB_VECTOR_INITIALIZE_MAX_VECTOR_LENGTH", "1536").strip()
or "1536"
)

# Distance strategy:
# - cosine => vec_distance_cosine(...)
# - euclidean => vec_distance_euclidean(...)
MARIADB_VECTOR_DISTANCE_STRATEGY = (
os.environ.get("MARIADB_VECTOR_DISTANCE_STRATEGY", "cosine").strip().lower()
)

# HNSW M parameter (MariaDB VECTOR INDEX ... M=<int>)
MARIADB_VECTOR_INDEX_M = int(
os.environ.get("MARIADB_VECTOR_INDEX_M", "8").strip() or "8"
)

# Pooling (MariaDB-Vector)
MARIADB_VECTOR_POOL_SIZE = os.environ.get("MARIADB_VECTOR_POOL_SIZE", None)

if MARIADB_VECTOR_POOL_SIZE != None:
try:
MARIADB_VECTOR_POOL_SIZE = int(MARIADB_VECTOR_POOL_SIZE)
except Exception:
MARIADB_VECTOR_POOL_SIZE = None

MARIADB_VECTOR_POOL_MAX_OVERFLOW = os.environ.get("MARIADB_VECTOR_POOL_MAX_OVERFLOW", 0)

if MARIADB_VECTOR_POOL_MAX_OVERFLOW == "":
MARIADB_VECTOR_POOL_MAX_OVERFLOW = 0
else:
try:
MARIADB_VECTOR_POOL_MAX_OVERFLOW = int(MARIADB_VECTOR_POOL_MAX_OVERFLOW)
except Exception:
MARIADB_VECTOR_POOL_MAX_OVERFLOW = 0

MARIADB_VECTOR_POOL_TIMEOUT = os.environ.get("MARIADB_VECTOR_POOL_TIMEOUT", 30)

if MARIADB_VECTOR_POOL_TIMEOUT == "":
MARIADB_VECTOR_POOL_TIMEOUT = 30
else:
try:
MARIADB_VECTOR_POOL_TIMEOUT = int(MARIADB_VECTOR_POOL_TIMEOUT)
except Exception:
MARIADB_VECTOR_POOL_TIMEOUT = 30

MARIADB_VECTOR_POOL_RECYCLE = os.environ.get("MARIADB_VECTOR_POOL_RECYCLE", 3600)

if MARIADB_VECTOR_POOL_RECYCLE == "":
MARIADB_VECTOR_POOL_RECYCLE = 3600
else:
try:
MARIADB_VECTOR_POOL_RECYCLE = int(MARIADB_VECTOR_POOL_RECYCLE)
except Exception:
MARIADB_VECTOR_POOL_RECYCLE = 3600

ENABLE_MARIADB_VECTOR = True
if VECTOR_DB == "mariadb-vector":
if not MARIADB_VECTOR_DB_URL:
ENABLE_MARIADB_VECTOR = False
else:
try:
parsed = urlparse(MARIADB_VECTOR_DB_URL)
scheme = (parsed.scheme or "").lower()
# Require official driver so VECTOR binds as float32 bytes correctly
if scheme != "mariadb+mariadbconnector":
ENABLE_MARIADB_VECTOR = False
except Exception:
ENABLE_MARIADB_VECTOR = False


# Milvus
MILVUS_URI = os.environ.get("MILVUS_URI", f"{DATA_DIR}/vector_db/milvus.db")
MILVUS_DB = os.environ.get("MILVUS_DB", "default")
Expand Down
8 changes: 4 additions & 4 deletions backend/open_webui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1804,8 +1804,8 @@ async def chat_completion(
}

# Check base model existence for custom models
if model_info_params.get("base_model_id"):
base_model_id = model_info_params.get("base_model_id")
if model_info and model_info.base_model_id:
base_model_id = model_info.base_model_id
if base_model_id not in request.app.state.MODELS:
if ENABLE_CUSTOM_MODEL_FALLBACK:
default_models = (
Expand Down Expand Up @@ -1940,7 +1940,7 @@ async def process_chat(request, form_data, user, metadata, model):
"model": model_id,
},
)
except:
except Exception:
pass

ctx = build_chat_response_context(
Expand Down Expand Up @@ -1987,7 +1987,7 @@ async def process_chat(request, form_data, user, metadata, model):
{"type": "chat:tasks:cancel"},
)

except:
except Exception:
pass
finally:
try:
Expand Down
9 changes: 9 additions & 0 deletions backend/open_webui/models/chat_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,13 @@ def get_token_usage_by_user(
self,
start_date: Optional[int] = None,
end_date: Optional[int] = None,
group_id: Optional[str] = None,
db: Optional[Session] = None,
) -> dict[str, dict]:
"""Aggregate token usage by user using database-level aggregation."""
with get_db_context(db) as db:
from sqlalchemy import func, cast, Integer
from open_webui.models.groups import GroupMember

dialect = db.bind.dialect.name

Expand Down Expand Up @@ -464,6 +466,13 @@ def get_token_usage_by_user(
query = query.filter(ChatMessage.created_at >= start_date)
if end_date:
query = query.filter(ChatMessage.created_at <= end_date)
if group_id:
group_users = (
db.query(GroupMember.user_id)
.filter(GroupMember.group_id == group_id)
.subquery()
)
query = query.filter(ChatMessage.user_id.in_(group_users))

results = query.group_by(ChatMessage.user_id).all()

Expand Down
14 changes: 11 additions & 3 deletions backend/open_webui/models/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from sqlalchemy.orm import Session
from open_webui.internal.db import Base, JSONField, get_db, get_db_context
from open_webui.utils.misc import sanitize_metadata
from pydantic import BaseModel, ConfigDict, model_validator
from sqlalchemy import BigInteger, Column, String, Text, JSON

Expand Down Expand Up @@ -127,9 +128,16 @@ def insert_new_file(
self, user_id: str, form_data: FileForm, db: Optional[Session] = None
) -> Optional[FileModel]:
with get_db_context(db) as db:
file_data = form_data.model_dump()

# Sanitize meta to remove non-JSON-serializable objects
# (e.g. callable tool functions, MCP client instances from middleware)
if file_data.get("meta"):
file_data["meta"] = sanitize_metadata(file_data["meta"])

file = FileModel(
**{
**form_data.model_dump(),
**file_data,
"user_id": user_id,
"created_at": int(time.time()),
"updated_at": int(time.time()),
Expand Down Expand Up @@ -289,7 +297,7 @@ def search_files(
db: Optional database session.

Returns:
List of matching FileModel objects, ordered by updated_at descending.
List of matching FileModel objects, ordered by created_at descending.
"""
with get_db_context(db) as db:
query = db.query(File)
Expand All @@ -303,7 +311,7 @@ def search_files(

return [
FileModel.model_validate(file)
for file in query.order_by(File.updated_at.desc())
for file in query.order_by(File.created_at.desc(), File.id.desc())
.offset(skip)
.limit(limit)
.all()
Expand Down
3 changes: 3 additions & 0 deletions backend/open_webui/retrieval/loaders/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
"hs",
"lhs",
"json",
"yaml",
"yml",
"toml",
]


Expand Down
4 changes: 4 additions & 0 deletions backend/open_webui/retrieval/vector/dbs/elasticsearch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
NOTE: This vector database integration is community-supported and maintained on a best-effort basis.
"""

from elasticsearch import Elasticsearch, BadRequestError
from typing import Optional
import ssl
Expand Down
Loading
Loading