Skip to content

Commit 07eb51e

Browse files
committed
fix: skip search_web citations if tool result is not a list
1 parent 44a0514 commit 07eb51e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

backend/open_webui/utils/middleware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ def get_citation_source_from_tool_result(
246246
if tool_name == 'search_web':
247247
# Parse JSON array: [{"title": "...", "link": "...", "snippet": "..."}]
248248
results = tool_result
249+
if not isinstance(results, list):
250+
return []
249251
documents = []
250252
metadata = []
251253

0 commit comments

Comments
 (0)