📦 feat: Configure Skill Import Size Limit - #13073
Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds a configurable skill-import upload size limit so the API no longer hard-codes the 50MB cap and instead honors fileConfig.skills.fileSizeLimit (with the same “MB in config → bytes at runtime” behavior used elsewhere in fileConfig).
Changes:
- Introduces
fileConfig.skills.fileSizeLimit(default 50MB) and merges it with MB→bytes conversion inmergeFileConfig. - Makes the
/api/skills/importmulter limit request-scoped by resolving the configured size limit per request, and passes the same limit into zip validation. - Adds targeted unit/integration tests covering config merging, request-scoped import limits, and the route-level upload boundary.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/data-provider/src/types/files.ts | Extends FileConfig/FileConfigInput types to include skills.fileSizeLimit. |
| packages/data-provider/src/file-config.ts | Adds default + schema support for skills.fileSizeLimit and merges it with MB→bytes conversion. |
| packages/data-provider/src/file-config.spec.ts | Adds coverage for skills import limit defaulting and MB→bytes conversion. |
| packages/api/src/skills/import.ts | Allows request-scoped import limits via a limits(req) option and applies it to zip validation. |
| packages/api/src/skills/tests/import.test.ts | Tests request-scoped import limits behavior. |
| api/server/routes/skills.js | Applies request-scoped multer fileSize limits using merged fileConfig.skills.fileSizeLimit, and threads it into import zip validation. |
| api/server/routes/skills.test.js | Verifies the upload boundary rejects oversize imports based on fileConfig.skills.fileSizeLimit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
GitNexus: 🚀 deployedThe |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4331a0bb87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67eac1b5a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
GitNexus: 🚀 deployedThe |
67eac1b to
660cefe
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
GitNexus: 🚀 deployedThe |
* fix: configure skill import size limit * fix: validate skill import size in ui * fix: align skill import size boundary * fix: show exact skill import limit
* fix: configure skill import size limit * fix: validate skill import size in ui * fix: align skill import size boundary * fix: show exact skill import limit
* fix: configure skill import size limit * fix: validate skill import size in ui * fix: align skill import size boundary * fix: show exact skill import limit
Summary
I added a configurable skill import size limit so OSS LibreChat can honor
fileConfig.skills.fileSizeLimitinstead of keeping skill imports fixed to the previous 50 MB behavior.fileConfig.skills.fileSizeLimitwith a 50 MB default and MB-to-bytes merging in the data provider.Change Type
Testing
npm ci --include=devto install the workspace dependencies from the lockfile.npm run build:data-provider.npm run build:data-schemas.npm run build:api.npx jest src/file-config.spec.ts --runInBand --coverage=falseinpackages/data-provider.npx jest src/skills/__tests__/import.test.ts --runInBand --coverage=falseinpackages/api.npx jest server/routes/skills.test.js --runInBand --coverage=falseinapi.Test Configuration:
v20.19.510.8.2Checklist