mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #22308] [CLOSED] fix: Handle search_web error in citation parser #26605
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22308
Author: @fskeung
Created: 3/6/2026
Status: ❌ Closed
Base:
main← Head:fix/search-web-citation-error📝 Commits (2)
426b314fix: Clear selected tools when switching models44461a2fix: Handle search_web error case in citation parser📊 Changes
2 files changed (+7 additions, -3 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+5 -0)📝
src/lib/components/chat/Chat.svelte(+2 -3)📄 Description
Summary
When web search fails and returns an error string instead of a valid JSON list, the citation parser crashes with
AttributeError: 'str' object has no attribute 'get'.Changes
get_citation_source_from_tool_resultfunctionIssue
Fixes #21070 - AttributeError: 'str' object has no attribute 'get' in citation parser when web search fails
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.