🦙 fix: Ollama Provider Handling (#10711)
* 🔧 fix: Correct URL Construction in fetchModels Function Updated the URL construction in the fetchModels function to ensure proper formatting by removing trailing slashes from the base URL. This change prevents potential issues with API endpoint calls. * 🔧 fix: Remove OLLAMA from Known Custom Providers Updated the isKnownCustomProvider function and providerConfigMap to exclude OLLAMA as a known custom provider, streamlining the provider checks and configurations. * 🔧 test: Enhance fetchModels Tests for URL Construction Added new test cases to validate the URL construction in the fetchModels function, ensuring it handles trailing slashes correctly and appends query parameters as expected. This improves the robustness of the API endpoint calls. * chore: remove ollama provider-specific handling * chore: Refactor imports to use isUserProvided from @librechat/api
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
"@azure/storage-blob": "^12.27.0",
|
||||
"@keyv/redis": "^4.3.3",
|
||||
"@langchain/core": "^0.3.79",
|
||||
"@librechat/agents": "^3.0.33",
|
||||
"@librechat/agents": "^3.0.34",
|
||||
"@librechat/data-schemas": "*",
|
||||
"@modelcontextprotocol/sdk": "^1.21.0",
|
||||
"axios": "^1.12.1",
|
||||
|
||||
@@ -16,9 +16,9 @@ import { resolveHeaders, createSafeUser } from '~/utils/env';
|
||||
|
||||
const customProviders = new Set([
|
||||
Providers.XAI,
|
||||
Providers.OLLAMA,
|
||||
Providers.DEEPSEEK,
|
||||
Providers.OPENROUTER,
|
||||
KnownEndpoints.ollama,
|
||||
]);
|
||||
|
||||
export function getReasoningKey(
|
||||
|
||||
@@ -41,7 +41,6 @@ export enum Providers {
|
||||
BEDROCK = 'bedrock',
|
||||
MISTRALAI = 'mistralai',
|
||||
MISTRAL = 'mistral',
|
||||
OLLAMA = 'ollama',
|
||||
DEEPSEEK = 'deepseek',
|
||||
OPENROUTER = 'openrouter',
|
||||
XAI = 'xai',
|
||||
@@ -59,7 +58,6 @@ export const documentSupportedProviders = new Set<string>([
|
||||
Providers.VERTEXAI,
|
||||
Providers.MISTRALAI,
|
||||
Providers.MISTRAL,
|
||||
Providers.OLLAMA,
|
||||
Providers.DEEPSEEK,
|
||||
Providers.OPENROUTER,
|
||||
Providers.XAI,
|
||||
@@ -71,7 +69,6 @@ const openAILikeProviders = new Set<string>([
|
||||
EModelEndpoint.custom,
|
||||
Providers.MISTRALAI,
|
||||
Providers.MISTRAL,
|
||||
Providers.OLLAMA,
|
||||
Providers.DEEPSEEK,
|
||||
Providers.OPENROUTER,
|
||||
Providers.XAI,
|
||||
|
||||
Reference in New Issue
Block a user