From 3c94ff2c04651f3192006cf1718d10f273e14e13 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sun, 10 Nov 2024 14:13:14 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=99=20fix:=20normalized=20endpoint=20f?= =?UTF-8?q?or=20Ollama=20(#4681)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/server/services/Config/getCustomConfig.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/server/services/Config/getCustomConfig.js b/api/server/services/Config/getCustomConfig.js index 6704475b5c..5b9b2dd186 100644 --- a/api/server/services/Config/getCustomConfig.js +++ b/api/server/services/Config/getCustomConfig.js @@ -1,4 +1,5 @@ const { CacheKeys, EModelEndpoint } = require('librechat-data-provider'); +const { normalizeEndpointName } = require('~/server/utils'); const loadCustomConfig = require('./loadCustomConfig'); const getLogStores = require('~/cache/getLogStores'); @@ -34,7 +35,9 @@ const getCustomEndpointConfig = async (endpoint) => { const { endpoints = {} } = customConfig; const customEndpoints = endpoints[EModelEndpoint.custom] ?? []; - return customEndpoints.find((endpointConfig) => endpointConfig.name === endpoint); + return customEndpoints.find( + (endpointConfig) => normalizeEndpointName(endpointConfig.name) === endpoint, + ); }; module.exports = { getCustomConfig, getCustomEndpointConfig };