From f3ef8b94913d98e96bfd74c175f258043ae77f37 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:28:38 +0100 Subject: [PATCH] fix: Sub-agents settings show blank and switched off when a limit is 0 (#33612) Saving the Sub-agents admin tab could turn sub-agents off and clear their system prompt when one of the limits was still 0. Older releases accepted 0 there, also from the SUBAGENTS_MAX_* environment variables, but the tab now fails to load such a value and shows everything blank and switched off, so saving writes that blank state back. A limit of 0 now shows as empty, meaning no limit, which matches what sub-agents already do with a 0 while they run. Fixes #33609 --- backend/open_webui/routers/configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/routers/configs.py b/backend/open_webui/routers/configs.py index 1f57f3dd6c..b9f0cec932 100644 --- a/backend/open_webui/routers/configs.py +++ b/backend/open_webui/routers/configs.py @@ -814,7 +814,7 @@ class SubagentsConfigForm(BaseModel): ) @classmethod def normalize_limit(cls, value): - return None if value == '' else value + return None if value in ('', 0) else value @field_validator('SUBAGENTS_MAX_CONCURRENT', 'SUBAGENTS_MAX_ASYNC', mode='before') @classmethod