refactor: update imports to use normalizeEndpointName from @librechat/api and remove redundant definitions

This commit is contained in:
Danny Avila 2025-08-18 02:31:08 -04:00
parent 8df0ecd438
commit 5e70d518aa
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
6 changed files with 17 additions and 18 deletions

View file

@ -8,7 +8,6 @@ const {
defaultAgentCapabilities,
} = require('librechat-data-provider');
const { sendEvent } = require('@librechat/api');
const { Providers } = require('@librechat/agents');
const partialRight = require('lodash/partialRight');
/** Helper function to escape special characters in regex
@ -207,15 +206,6 @@ function generateConfig(key, baseURL, endpoint) {
return config;
}
/**
* Normalize the endpoint name to system-expected value.
* @param {string} name
* @returns {string}
*/
function normalizeEndpointName(name = '') {
return name.toLowerCase() === Providers.OLLAMA ? Providers.OLLAMA : name;
}
module.exports = {
isEnabled,
handleText,
@ -226,5 +216,4 @@ module.exports = {
generateConfig,
addSpaceIfNeeded,
createOnProgress,
normalizeEndpointName,
};