Files
open-webui-ai4me/backend/open_webui
Classic298 bfc606a9e3 fix: align file context injection by user-role messages for native FC (#22776)
The add_file_context function used a positional zip() to pair API
payload messages with DB-stored messages. After
process_messages_with_output() expands assistant messages containing
tool calls into multiple OpenAI-format messages (assistant + tool
results), the payload list becomes longer than the stored list. This
caused the zip to misalign, so subsequent user messages never received
their attached_files tags -- the model could see uploaded images via
vision but had no file URL to pass to edit_image.

Fix: filter both lists to user-role messages only before zipping.
User messages maintain the same order in both lists regardless of
assistant message expansion, restoring correct file context injection.

Fixes #21878
2026-03-25 16:56:43 -05:00
..
2026-03-17 17:58:01 -05:00
2026-03-17 17:58:01 -05:00
2026-03-24 20:48:10 -05:00
2026-03-25 16:43:06 -05:00
2026-03-25 16:43:06 -05:00
2026-03-24 04:49:48 -05:00
2026-03-23 23:39:52 -05:00
2026-03-17 17:58:01 -05:00
2026-03-17 17:58:01 -05:00
2026-03-24 06:07:20 -05:00
2026-03-24 15:41:26 -05:00
2026-03-25 16:43:06 -05:00
2026-03-17 17:58:01 -05:00
2026-03-23 20:42:48 -05:00
2026-03-17 17:58:01 -05:00
2026-03-24 17:58:21 -05:00
2026-03-17 17:58:01 -05:00