mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🦙 fix: Ollama Provider Handling (#10711)
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Has been cancelled
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Has been cancelled
* 🔧 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:
parent
872dbb4151
commit
801c95a829
9 changed files with 317 additions and 152 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue