LibreChat/packages
Dustin Healy ea3cb56988 🐛 fix: replace multi-join $lookup in getPromptGroup for DocumentDB
Replace the subpipeline $lookup in getPromptGroup with the simple
localField/foreignField form and enforce tenant isolation on the joined
production prompt in JS after $unwind.

AWS DocumentDB does not support the $lookup with let + pipeline form
and rejects the aggregation with:

    MongoServerError: Aggregation stage not supported:
    '$lookup on multiple join conditions'

Because the catch block returns null, the route treats the prompt
group as missing and responds 404 Not Found. Any page that loads a
single prompt group (open-for-edit, detail view, etc.) breaks under
TENANT_ISOLATION_STRICT=true on a DocumentDB-backed deployment.

The simple localField/foreignField form works on both real MongoDB
and DocumentDB. Tenant filtering of the joined production prompt is
now done after $unwind by clearing the field when its tenantId does
not match the active context.
2026-05-21 07:59:34 -07:00
..
api 🧵 chore: Raise MCP SSE Line Default (#13224) 2026-05-21 09:06:02 -04:00
client v0.8.6-rc1 (#13094) 2026-05-12 21:40:23 -04:00
data-provider 🧯 fix: Harden Data Retention Semantics (#13049) 2026-05-19 21:58:42 -04:00
data-schemas 🐛 fix: replace multi-join $lookup in getPromptGroup for DocumentDB 2026-05-21 07:59:34 -07:00