mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-26 17:30:27 -04:00
fix: stop storing MCP image/audio base64 in file metadata (#30419)
When an MCP tool returns an image or audio item, the file is uploaded to storage, but the whole MCP item, including its base64 payload, was also passed as upload metadata. That metadata is persisted in the file table's meta column, so every such result was stored twice: once in storage and once as base64 in the database, growing the DB and every file query that loads meta. The MCP path now passes only chat_id, message_id and session_id, the same metadata the non-MCP tool image path already stores. Nothing reads the removed key. Fixes #30411
This commit is contained in:
@@ -1195,7 +1195,6 @@ async def process_tool_result(
|
||||
'chat_id': metadata.get('chat_id', None),
|
||||
'message_id': metadata.get('message_id', None),
|
||||
'session_id': metadata.get('session_id', None),
|
||||
'result': item,
|
||||
},
|
||||
user,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user