mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #23049] issue: Rich UI embeds rendering above message content instead of below #19874
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 @ApexArray on GitHub (Mar 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23049
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.8.10 (also present in v0.8.11)
Ollama Version (if applicable)
No response
Operating System
Debian 13
Browser (if applicable)
Chromium 146.0.7680.164, Firefox
Confirmation
README.md.Expected Behavior
Rich HTML UI embeds (from functions/actions) from should render below the message text content.
Actual Behavior
Rich UI embeds are rendered above the the message content (see screenshot)
Steps to Reproduce
Logs & Screenshots
Current behavior:

After git patch:
Additional Information
What I've tried:
This seems to just come down to the ordering in the ResponseMessage.svelelte file.
Embeds rendered starting on L296
4d058a125b/src/lib/components/chat/Messages/ResponseMessage.svelte (L696-L713)Message text rendered starting on L783
4d058a125b/src/lib/components/chat/Messages/ResponseMessage.svelte (L783-L793)I tested the following patch, and the content is rendered in the correct position (see screenshot):
Not sure if there's any other edge-cases that rely on the existing rendering order. I'm happy to open a PR, or feel free to use the above patch if that's easier.
@Classic298 commented on GitHub (Mar 26, 2026):
Sorry the docs is wrong here my mistake i will correct it.
It's correct that they render above the message and not below it (has been discussed multiple times) but unfortunately this is the final decision that was made
@ApexArray commented on GitHub (Mar 26, 2026):
Thanks for the update, I did not find any of those discussions when searching before I opened the issue.
I'm working on a context usage meter plugin (filter) that would be better suited for the bottom of the message.
Is there any appetite to support both options? I'd be happy to work on a PR introducing an extra (optional) emitter argument or similar to control whether it gets rendered at the top or bottom.
Alternatively, it would be nice to have some "middle ground" between embeds (stored in db and not removable, thus polluting chat history) and execute (ephemeral and don't persist after navigating away).
There are a some cases where it makes sense to have a live "footer" displayed at the bottom of the most recent message that persists in the database (or is built dynamically based on db values), but is not displayed for every single message in the chat history.
Let me know if it's worth opening a discussion or submitting an RFC.
@Classic298 commented on GitHub (Mar 26, 2026):
All of this was discussed in the discussions i mentioned that were had. This is not wanted (unfortunately)
@Classic298 commented on GitHub (Mar 26, 2026):
What you can try is have it be emitted via a filter
@ApexArray commented on GitHub (Mar 26, 2026):
That's how it's working currently. The filter grabs token usage stats returned from the inference provider in the
streammethod and falls back to manually counting tokens inbody["messages"]if no stats are returned.It then builds the HTML fragment and emits via
__event_emitter__({"type": "embeds", "data": {"embeds": [html_fragment]}})I know I could also use an execute event, but those won't persist after navigating away from the page.
Let me know if there's an alternative workflow that would work better for this case.
@Classic298 commented on GitHub (Mar 26, 2026):
@tjbck