mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #20991] issue: Empty embeds attribute renders as {} in tool calls UI #34882
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?
Originally created by @cannontrodder on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20991
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.7.2
Ollama Version (if applicable)
N/A (using AWS Bedrock via LiteLLM)
Operating System
Kubernetes (Linux containers)
Browser (if applicable)
Chrome, Safari
Confirmation
README.md.Expected Behavior
When a tool call completes without any embeds (e.g., image generation tools), the UI should cleanly display the tool result without any spurious rendered content.
Actual Behavior
An empty object
{}is rendered in a red box in the UI after tool calls that don't return embeds. The browser console shows:Root Cause Analysis
In
backend/open_webui/utils/middleware.pyat line 2388:When
embedsis missing from the result:""(empty string)json.dumps("")→'""'html.escape('""')→'""'embeds=""""In the frontend (
Collapsible.svelteline 96):decode('""')→""JSON.parse('""')→""(empty string, not array)if embeds && Array.isArray(embeds)fails{}Steps to Reproduce
{}rendered in the UI and JSON parse error in consoleProposed Fix
I have a PR ready with this fix.
Logs & Screenshots
Browser console error:
Stored message content showing the problematic attribute:
@cannontrodder commented on GitHub (Jan 28, 2026):
Fix submitted in #20993
@cannontrodder commented on GitHub (Jan 28, 2026):
PR #20993 is now in draft mode. I'll be testing it locally shortly and will update once I've verified the fix works as expected.
@cannontrodder commented on GitHub (Jan 28, 2026):
Resubmitted as #20996 with a clean single commit (rebased and squashed as requested).
@cannontrodder commented on GitHub (Jan 28, 2026):
@Classic298 Resubmitted as #20996 with a clean single commit as requested. Ready for review when you get a chance.
@cannontrodder commented on GitHub (Jan 28, 2026):
Closing - the symptoms we observed were caused by a WAF configuration issue in our infrastructure, not an upstream bug. The 403 response from the WAF was being parsed as JSON, causing the error. Apologies for the noise.