Repository navigation
Conversation
Add .xlsb to the hardened egress gateway's artifact policy and the sandboxed Python image's spreadsheet packages, so Code Interpreter sessions can produce and read Excel Binary Workbook files end to end. - protocol.ts: add .xlsb to BRIDGE_ARTIFACT_EXTENSIONS (the egress gateway's output allow-list) and map it to application/vnd.ms-excel.sheet.binary.macroenabled.12 in BRIDGE_ARTIFACT_MEDIA_TYPES, next to the existing .xls/.xlsx entries. Without the first change, a sandboxed script that writes a .xlsb output would have it rejected by the gateway with a generic 'unsupported file type' error. - build-packages.sh / docker/package-init.sh: add python-calamine next to the existing xlrd entry in both the Docker-image-bake and PVC/direct-NsJail install paths (hand-maintained parallel lists, not generated from one another). pandas cannot auto-detect the .xlsb engine the way it does for .xlsx/.xls, so sandboxed code reads these files via pd.read_excel(path, engine='calamine'). calamine was chosen over pyxlsb (the other common option) because it's a single, faster, Rust-backed engine that also already handles .xlsx/.xls/.ods, rather than adding a second, XLSB-only dependency. - protocol.test.ts: extend the existing bridge-artifact-policy test with explicit .xlsb assertions covering both the extension allow-list and the media-type mapping. No change needed on the librechat side's code-interpreter integration: once librechat's own XLSB support lands, the existing text-extraction path already calls into this same engine.
gafda
marked this pull request as ready for review
October 13, 2026 08:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for the XLSB (Excel Binary Workbook) file format across the build environment and protocol layer, ensuring that workflows producing
.xlsbfiles (e.g., via thecalamineengine in pandas) are properly handled and served with the correct Content-Type. The changes include updating package installation scripts, protocol extension/media type mappings, and tests.Build environment updates:
python-calamineto the list of installed Python packages in bothbuild-packages.shanddocker/package-init.shto enable reading.xlsbfiles in Python workflows. [1] [2]Protocol support for XLSB:
.xlsbto the supported bridge artifact extensions inprotocol.ts..xlsbto the correct media type (application/vnd.ms-excel.sheet.binary.macroenabled.12) in the bridge artifact media types.Testing:
.xlsbfiles are recognized as supported artifacts and served with the correct Content-Type.