LibreChat/api/server/middleware
Marco Beretta 5f4a07f40b
⚡ perf: Exclude Agent Version History From Default getAgent Reads (#16070)
* ⚡ perf: Exclude Agent Version History From Default `getAgent` Reads

getAgent now defaults its projection to { versions: 0 }; loadAgent/loadAddedAgent
and canAccessAgentFromBody use getAgentWithVersionCount so the version count stays
exact without transferring the unbounded versions array on every chat request.
Callers that need history (v1 update/revert handlers) request it explicitly.

* fix: tighten agent version projection types

* fix: type projected agent version counts

* fix: type default agent projection

* style: format agent projection overload

* fix: expose projected agent return type
2026-09-20 19:27:21 -04:00
..
__tests__
accessResources ⚡ perf: Exclude Agent Version History From Default getAgent Reads (#16070) 2026-09-20 19:27:21 -04:00
assistants 🔣 refactor: Replace Mongo Filters With Typed Criteria (#15580) 2026-09-04 11:54:21 -04:00
config
limiters 🗯️ fix: Give Failed Turns Actionable Guidance (#15896) 2026-09-14 10:37:22 -04:00
roles
spec 🔣 refactor: Replace Mongo Filters With Typed Criteria (#15580) 2026-09-04 11:54:21 -04:00
validate ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
abortMiddleware.js 💰 fix: Bill Stopped Agent Turns From Provider Usage (#15889) 2026-09-13 21:51:05 -04:00
abortMiddleware.spec.js 💰 fix: Bill Stopped Agent Turns From Provider Usage (#15889) 2026-09-13 21:51:05 -04:00
abortRun.js
buildEndpointOption.js
buildEndpointOption.spec.js
canAccessSharedLink.js
canDeleteAccount.js
canDeleteAccount.spec.js
checkBan.js 🔑 fix: Stringify Ban Cache Keys When Redis Is Off (#16039) 2026-09-19 15:52:06 -04:00
checkBan.spec.js 🔑 fix: Stringify Ban Cache Keys When Redis Is Off (#16039) 2026-09-19 15:52:06 -04:00
checkDomainAllowed.js
checkInviteUser.js 📮 fix: Consume an Invite Only Once the Account Exists (#15611) 2026-09-04 15:38:32 -04:00
checkInviteUser.spec.js 📮 fix: Consume an Invite Only Once the Account Exists (#15611) 2026-09-04 15:38:32 -04:00
checkPeoplePickerAccess.js 🫂 fix: Scope People Picker Searches to Permitted Types (#15878) 2026-09-13 02:48:27 -04:00
checkSharePublicAccess.js
checkSharePublicAccess.spec.js
denyRequest.js ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
error.js ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
index.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
logHeaders.js
messageValidation.js
moderateText.js
moderateText.spec.js
noIndex.js
oauthNavigation.js
optionalJwtAuth.js
optionalShareFileAuth.js
optionalShareFileAuth.spec.js
requireJwtAuth.js
requireLdapAuth.js
requireLocalAuth.js
requireSameOrigin.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
setHeaders.js feat(GPT/Anthropic): Continue Regenerating & Generation Buttons (#808) 2023-08-17 12:50:05 -04:00
setTwoFactorTempUser.js
uaParser.js
validateEmailLogin.js
validateImageRequest.js
validateMessageReq.js
validateModel.js
validatePasswordReset.js
validateRegistration.js