Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🦙 fix: normalized endpoint for Ollama (#4681)

Danny Avila3c94ff2c0465
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 };