mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-03 22:32:42 +00:00
⚙️ perf: reduce first-load MongoDB round trips (#14101)
* perf(api): reduce first-load database round trips * docs: move agent guidance to claude docs * refactor(api): move message validation into api package * fix(api): narrow active generation job lookup * fix(api): preserve omitted source identity
This commit is contained in:
parent
a0aa1f2b9d
commit
44d1275f36
25 changed files with 895 additions and 242 deletions
|
|
@ -4,6 +4,7 @@ const {
|
|||
mergeHeaders,
|
||||
getAnthropicModels,
|
||||
getBedrockModels,
|
||||
getAppConfigOptionsFromUser,
|
||||
getOpenAIModels,
|
||||
getGoogleModels,
|
||||
} = require('@librechat/api');
|
||||
|
|
@ -17,13 +18,7 @@ const { getAppConfig } = require('./app');
|
|||
*/
|
||||
async function loadDefaultModels(req) {
|
||||
try {
|
||||
const appConfig =
|
||||
req.config ??
|
||||
(await getAppConfig({
|
||||
role: req.user?.role,
|
||||
userId: req.user?.id,
|
||||
tenantId: req.user?.tenantId,
|
||||
}));
|
||||
const appConfig = req.config ?? (await getAppConfig(getAppConfigOptionsFromUser(req.user)));
|
||||
const vertexConfig = appConfig?.endpoints?.[EModelEndpoint.anthropic]?.vertexConfig;
|
||||
|
||||
/** Forward configured custom headers (endpoint over global `all`) so model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue