mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 16:23:44 +00:00
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.
|
||
|---|---|---|
| .. | ||
| api | ||
| client | ||
| data-provider | ||
| data-schemas | ||