mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-06 08:18:53 +00:00
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 |
||
|---|---|---|
| .. | ||
| access_control | ||
| images | ||
| mcp | ||
| telemetry | ||
| actions.py | ||
| anthropic.py | ||
| audit.py | ||
| auth.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| task.py | ||
| tools.py | ||
| validate.py | ||
| webhook.py | ||