LibreChat/api/server/services/Config/loadCustomConfig.js
lia-by-librechat[bot] 2068a8b17f
🏺 fix: Preserve Last Good Config on Reload (#16383)
* 🏺 fix: Preserve Last Good Config on Reload

* fix: Restore Reload Cap and OpenRouter Defaults

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-09-27 07:35:56 -04:00

11 lines
402 B
JavaScript

const path = require('path');
const { loadYaml, redactConfigSecretMaps, createCustomConfigLoader } = require('@librechat/api');
const projectRoot = path.resolve(__dirname, '..', '..', '..', '..');
const defaultConfigPath = path.resolve(projectRoot, 'librechat.yaml');
module.exports = createCustomConfigLoader({
loadLocal: loadYaml,
defaultConfigPath,
redactConfig: redactConfigSecretMaps,
});