open-webui/backend
Classic298 443c0bea8e fix: use the active chat model for context compaction when no compaction model is set
The "Context Compaction Model" setting offers a "Current Model" option, described in the admin panel as following the active chat model. That option writes an empty string, which `_generate_summary` treated as "no override" and then resolved through `get_task_model_id`, returning the configured Local or External Task Model whenever one is set. On any instance with a task model configured, compaction therefore ran on the task model and "Current Model" did nothing.

Resolve the compaction model directly instead: use the configured compaction model when it is available, otherwise the active chat model. Task model settings keep governing title, tags, query and follow-up generation; only compaction stops inheriting them. Admins who want compaction on the task model can select that model explicitly in the compaction dropdown.

Note for existing deployments: instances that set a task model and left the compaction model unset will now compact on the active chat model, which is what the setting always claimed to do but may be a more expensive model. Select the intended model in the Context Compaction Model dropdown to pin it.

Fixes #27603
2026-07-28 23:31:44 +02:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix: use the active chat model for context compaction when no compaction model is set 2026-07-28 23:31:44 +02: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 fix: make the aiodns resolver opt-in and pin aiodns to 3.6.1 (#28242) 2026-08-10 19:52:29 -06:00
start.sh refac 2026-06-17 03:01:11 +02:00
start_windows.bat fix: generate valid WEBUI_SECRET_KEY in start_windows.bat (#28061) 2026-08-10 23:22:43 -06:00