From 6fe6b5d011abb039fbe73f170ce962f057c8916f Mon Sep 17 00:00:00 2001 From: mlarsen <174657206+mlarsen-source@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:52:33 -0700 Subject: [PATCH] bugfix --- backend/services/llm/router.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/services/llm/router.py b/backend/services/llm/router.py index 3e04583..9ed3790 100644 --- a/backend/services/llm/router.py +++ b/backend/services/llm/router.py @@ -247,7 +247,10 @@ def _generate_with_retry( continue try: - return json.loads(raw) + data = json.loads(raw) + if isinstance(data, list) and data: + data = data[0] + return data except json.JSONDecodeError as exc: last_error = exc continue