feat(config): add location feature flag and geocoder config

Adds a `location` section to librechat.yaml config with enabled/geocoder
fields, wires loadLocationConfig into AppService, and surfaces the resolved
flag in the startup-config endpoint so the UI can gate location controls.
This commit is contained in:
Marco Beretta 2026-06-15 18:41:42 +02:00
parent baa369a448
commit fdca6184ba
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
6 changed files with 74 additions and 0 deletions

View file

@ -181,6 +181,18 @@ function buildWebSearchConfig(appConfig) {
};
}
function buildLocationStartupConfig(appConfig) {
const loc = appConfig?.location;
if (!loc || loc.enabled === false) {
return undefined;
}
const out = { enabled: true };
if (loc.geocoder?.endpoint) {
out.geocoder = { endpoint: loc.geocoder.endpoint };
}
return out;
}
function buildCloudFrontStartupConfig() {
const config = getCloudFrontConfig();
if (
@ -284,6 +296,11 @@ router.get('/', async function (req, res) {
payload.webSearch = webSearch;
}
const location = buildLocationStartupConfig(appConfig);
if (location) {
payload.location = location;
}
const buildInfo = buildBuildInfoPayload(appConfig?.interfaceConfig);
if (buildInfo) {
payload.buildInfo = buildInfo;