LibreChat/packages/api/src
Danny Avila e452a130e9
perf: Minimize group membership query in principal resolution (#14055)
getUserPrincipals resolves a user's ACL principals on nearly every
authenticated request. It fetched full group documents (including entire
memberIds arrays) only to read each group _id, and always issued a
separate User lookup for idOnTheSource.

- Project { _id: 1 } on the memberIds group query so it returns only ids
  and can be served from the { memberIds: 1 } index instead of fetching
  and decoding whole group docs.
- Accept role and idOnTheSource from the already-loaded request user and
  thread them from the capability middleware, collapsing the hot path to
  a single indexed group query (idOnTheSource: null means known-local).
2026-07-02 08:44:40 -04:00
..
acl
actions
admin
agents 🩹 fix: Coerce Stringified edit_file Edits (JSON-in-JSON) (#14056) 2026-07-01 12:41:26 -04:00
apiKeys
app
artifacts
auth 🚪 fix: Support Admin Redirect Detection for Same-Origin Subpaths (#14040) 2026-07-01 11:40:02 -04:00
cache
cdn 🔥 fix: Firebase CDN Initialization Under tsdown CJS Interop (#14046) 2026-07-01 08:20:40 -04:00
cluster
crypto
db
endpoints 🧠 fix: Default Bedrock thinking maxTokens to model max output (#14058) 2026-07-01 18:29:45 -04:00
files fix: bound peak memory of concurrent base64 attachment encoding (#14023) 2026-07-01 08:22:16 -04:00
flow
html
langfuse
mcp
memory
middleware perf: Minimize group membership query in principal resolution (#14055) 2026-07-02 08:44:40 -04:00
modelSpecs 🥷 feat: Add showInMenu Option to Model Specs (#14034) 2026-06-30 19:32:59 -04:00
oauth
projects
prompts
rum
shared-links
skills
storage
stream
telemetry
tools 📐 test: Guard Web Search Description Length (#14044) 2026-07-01 10:42:53 -04:00
types
utils 🤖 feat: Add Claude Sonnet 5 Support (#14042) 2026-06-30 19:26:33 -04:00
web
index.ts
telemetry.ts