From 1c5f101d0bb6d43ef5d03a465f8b7b71f500dfb7 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Tue, 13 Oct 2026 08:46:17 -0400 Subject: [PATCH] fix: show follow-up suggestions when the task model adds text around its JSON (#32323) --- backend/open_webui/utils/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/task.py b/backend/open_webui/utils/task.py index b5cee1dcb3..66f596c5c1 100644 --- a/backend/open_webui/utils/task.py +++ b/backend/open_webui/utils/task.py @@ -348,7 +348,7 @@ async def follow_up_generation_template( def parse_follow_ups(content: str, max_count: int = 5) -> list[str]: if not isinstance(content, str): return [] - content = re.sub(r'^```(?:json)?\s*|\s*```$', '', content.strip()) + content = content[content.find('{') : content.rfind('}') + 1] try: data = JSONCodec.loads(content) except (ValueError, TypeError):