diff --git a/src/backend/services/file.py b/src/backend/services/file.py index 50915d9bfe..16d19585ce 100644 --- a/src/backend/services/file.py +++ b/src/backend/services/file.py @@ -487,6 +487,7 @@ async def consolidate_agent_files_in_compass( "index": agent_id, "file_id": file_id, "file_bytes": fetched_doc["text"], + "filename": fetched_doc["file_name"], "custom_context": { "file_id": file_id, "file_name": fetched_doc["file_name"], @@ -569,6 +570,7 @@ async def insert_files_in_compass( "index": new_file_id if index is None else index, "file_id": new_file_id, "file_bytes": file_bytes, + "filename": filename, "custom_context": { "file_id": new_file_id, "file_name": filename,