Skip to content

📦 feat: Configure Skill Import Size Limit - #13073

Merged
danny-avila merged 4 commits into
devfrom
danny-avila/configurable-skill-import-limit-oss
May 11, 2026
Merged

danny-avila merged 4 commits into
devfrom
danny-avila/configurable-skill-import-limit-oss

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

I added a configurable skill import size limit so OSS LibreChat can honor fileConfig.skills.fileSizeLimit instead of keeping skill imports fixed to the previous 50 MB behavior.

  • Added fileConfig.skills.fileSizeLimit with a 50 MB default and MB-to-bytes merging in the data provider.
  • Updated skill import uploads to resolve the configured limit per request and apply it at the multer upload boundary.
  • Passed the same resolved limit into zip import validation so compressed skill archives use the configured cap consistently.
  • Added focused coverage for data-provider config merging, request-scoped import limits, and the API route upload boundary.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • Ran npm ci --include=dev to install the workspace dependencies from the lockfile.
  • Ran npm run build:data-provider.
  • Ran npm run build:data-schemas.
  • Ran npm run build:api.
  • Ran npx jest src/file-config.spec.ts --runInBand --coverage=false in packages/data-provider.
  • Ran npx jest src/skills/__tests__/import.test.ts --runInBand --coverage=false in packages/api.
  • Ran npx jest server/routes/skills.test.js --runInBand --coverage=false in api.

Test Configuration:

  • Node.js: v20.19.5
  • npm: 10.8.2

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

Copilot AI review requested due to automatic review settings May 11, 2026 19:10

Copy link
Copy Markdown
Collaborator Author

@codex review

@danny-avila
danny-avila marked this pull request as ready for review May 11, 2026 19:12
@danny-avila danny-avila changed the title 📦 fix: Configure Skill Import Size Limit 📦 feat: Configure Skill Import Size Limit May 11, 2026
@danny-avila
danny-avila changed the base branch from main to dev May 11, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in mergeFileConfig.
  • Makes the /api/skills/import multer 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13073 index is now live on the MCP server.
Deploy run

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread client/src/components/Skills/dialogs/UploadSkillDialog.tsx Outdated

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread client/src/components/Skills/dialogs/UploadSkillDialog.tsx
@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13073 index is now live on the MCP server.
Deploy run

@danny-avila
danny-avila force-pushed the danny-avila/configurable-skill-import-limit-oss branch from 67eac1b to 660cefe Compare May 11, 2026 19:53
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13073 index is now live on the MCP server.
Deploy run

@danny-avila
danny-avila merged commit c385f2b into dev May 11, 2026
16 checks passed
@danny-avila
danny-avila deleted the danny-avila/configurable-skill-import-limit-oss branch May 11, 2026 20:24
fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request May 15, 2026
* 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
patricia2510 pushed a commit to lexaeon-org/libre-chat that referenced this pull request May 21, 2026
* 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
ThomasVuNguyen pushed a commit to ThomasVuNguyen/LibreChat that referenced this pull request Jul 15, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants