open-webui/backend
silentoplayz 5eb684fbc9 fix(config): tolerate a non string default models value
default_models and default_pinned_models are stored as JSON and read as
comma separated strings. Nothing coerces them on the way out, so a value
that is not a string reaches the browser unchanged and every consumer that
calls split on it throws.

In v0.10.2 the only call site ran later in the chat flow, so a malformed
value sat there unnoticed. v0.11.0 added a second call site that runs while
the chat component initialises, which turned the same stored value into an
uncaught TypeError on New Chat: the route changed but the previous chat
stayed on screen and no new chat was created. Rolling back appeared to fix
it because the new call site was gone, not because the value had changed.

Both keys are now normalised where they are read. A list is joined back
into the comma separated form the readers expect, a string passes through,
and anything else becomes None. This covers the app config the browser
consumes, the admin models config endpoints, and the custom model fallback
lookup, which called split on the raw value as well.

The admin UI and the models config endpoint already write these keys as
strings, so this only concerns values that reached the database another
way, such as a config import, which upserts its payload without per key
validation.
2026-08-08 09:54:39 -04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix(config): tolerate a non string default models value 2026-08-08 09:54:39 -04:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh refac 2026-03-24 19:43:30 -05:00
requirements-min.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
requirements.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
start.sh refac 2026-06-17 03:01:11 +02:00
start_windows.bat refac 2026-06-17 03:01:11 +02:00