Repository navigation
Conversation
Contributor
|
👋 Thanks for the contribution! LibreChat merges all changes into Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto git remote add upstream https://github.com/LibreChat-AI/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-leaseMaintainers: apply the |
tek123168
force-pushed
the
fix/code-output-preflight-file-limit
branch
from
October 10, 2026 20:55
c44cc7d to
f7e6a42
Compare
…nactive Fixes LibreChat-AI#16919 - Rely on configuredMaxCount when inspectionActive is false - Remove redundant inspectionCountExceeded check in preflightCodeOutputBatch - Allow cachePreparedCodeOutputBuffer capacity to scale with configured fileLimit - Update preflight unit tests to cover batches exceeding default count with active fileLimit
tek123168
force-pushed
the
fix/code-output-preflight-file-limit
branch
from
October 10, 2026 21:05
f7e6a42 to
74431ec
Compare
Author
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.
Fixes #16919
Summary
When a code execution run generates more than 10 files (for example, rendering presentation slides or multi-page documents), outputs were bypassing preflight preparation and falling back to raw download handling even when content inspection was disabled (
inspectionActive = false) and a higherfileLimitwas configured.Root Cause
In
preflightCodeOutputBatch, a hardcoded preflight limit check capped output preparation at 10 files unconditionally, forcing files above 10 into download fallbacks without image previews or dimensions. In addition, the in-memory buffer cache inprocess.jshad a fixed capacity of 10 items, which could cause early buffer eviction during higher volume batches.Changes
packages/api/src/files/code/preflight.ts, rely strictly onconfiguredCountExceededwheninspectionActiveis false. When inspection is active, line 154 continues to enforceCODE_OUTPUT_PREFLIGHT_MAX_COUNTsafely.api/server/services/Files/Code/process.js, allowcachePreparedCodeOutputBuffercapacity to scale with the active endpointfileLimit(defaulting to 10 when unconfigured) to prevent buffer eviction during larger runs.packages/api/src/files/code/preflight.spec.tsto verify that outputs above 10 are prepared whenfileLimitpermits without inspection, and fall back to URL downloads only whenfileLimitis exceeded.