Repository navigation
Generated audio/video files (e.g. .mp4) are silently dropped from the sandbox output #16884
Replies: 1 comment
|
Your read is right. I checked
Workaround that works today: archives are in the allow-list ( For your self-hosted image: add the formats you need to |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, we run LibreChat with a self-hosted code-interpreter (GHCR images) for our team.
What happened
A user asked the assistant to create a short video. The Python script ran fine and wrote /mnt/data/party.mp4 (about 5.7 MB, well under the file size limit), together with a preview party.png and the script itself. The PNG and the .py file showed up in the chat. The MP4 never did.
There was no error, either in the chat or in the logs. The file-server only ever received the PNG and the .py. On the next tool call the MP4 was gone, because the sandbox had been cleaned up. The model then started guessing ("MP4 doesn't seem to be persistent") and the user had no idea what was going on.
Why it happens (as far as we can tell)
In api/src/job.ts there are two lists of file extensions:
SUPPORTED_EXTENSIONS decides which files are collected after a run. It has no audio or video formats.
MIME_TYPE_BY_EXTENSION sets the content type for uploads. It does list audio and video (.mp3, .wav, .mp4, .mov, .webm, …), and its comment names "audio/video" among the files that come out of code execution.
So it looks like audio/video output was meant to work, but the filter was never updated to match. A few other formats have a MIME type but are missing from the filter as well: .heic, .heif, .otf, .xz, .tgz, .mjs, .h, .wasm.
Steps to reproduce
Ask the assistant to run something like:
test.png is returned and test.mp4 is not, with no message about it.
What would help us
Bring the two lists in line, at least for the common audio/video formats.
If a file is skipped because of its extension, say so in the tool output, so the model can tell the user instead of guessing.
For now, we tell users to zip the file first, since .zip is allowed.
All reactions