diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js index 4a919876a..c9102e9ae 100644 --- a/api/app/clients/GoogleClient.js +++ b/api/app/clients/GoogleClient.js @@ -140,8 +140,7 @@ class GoogleClient extends BaseClient { this.options.attachments?.then((attachments) => this.checkVisionRequest(attachments)); /** @type {boolean} Whether using a "GenerativeAI" Model */ - this.isGenerativeModel = - this.modelOptions.model.includes('gemini') || this.modelOptions.model.includes('learnlm'); + this.isGenerativeModel = /gemini|learnlm|gemma/.test(this.modelOptions.model); this.maxContextTokens = this.options.maxContextTokens ?? diff --git a/api/models/tx.js b/api/models/tx.js index 04eb06bca..95f0b47db 100644 --- a/api/models/tx.js +++ b/api/models/tx.js @@ -111,6 +111,10 @@ const tokenValues = Object.assign( /* cohere doesn't have rates for the older command models, so this was from https://artificialanalysis.ai/models/command-light/providers */ command: { prompt: 0.38, completion: 0.38 }, + gemma: { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing + 'gemma-2': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing + 'gemma-3': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing + 'gemma-3-27b': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing 'gemini-2.0-flash-lite': { prompt: 0.075, completion: 0.3 }, 'gemini-2.0-flash': { prompt: 0.1, completion: 0.4 }, 'gemini-2.0': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing diff --git a/api/package.json b/api/package.json index eeefd199d..3327fdf61 100644 --- a/api/package.json +++ b/api/package.json @@ -43,12 +43,12 @@ "@google/generative-ai": "^0.23.0", "@googleapis/youtube": "^20.0.0", "@keyv/redis": "^4.3.3", - "@langchain/community": "^0.3.39", - "@langchain/core": "^0.3.43", - "@langchain/google-genai": "^0.2.2", - "@langchain/google-vertexai": "^0.2.3", + "@langchain/community": "^0.3.42", + "@langchain/core": "^0.3.51", + "@langchain/google-genai": "^0.2.5", + "@langchain/google-vertexai": "^0.2.5", "@langchain/textsplitters": "^0.1.0", - "@librechat/agents": "^2.4.22", + "@librechat/agents": "^2.4.30", "@librechat/data-schemas": "*", "@waylaidwanderer/fetch-event-source": "^3.0.1", "axios": "^1.8.2", @@ -90,7 +90,7 @@ "nanoid": "^3.3.7", "nodemailer": "^6.9.15", "ollama": "^0.5.0", - "openai": "^4.47.1", + "openai": "^4.96.2", "openai-chat-tokens": "^0.2.8", "openid-client": "^5.4.2", "passport": "^0.6.0", diff --git a/api/server/controllers/agents/callbacks.js b/api/server/controllers/agents/callbacks.js index 4ee57df67..d92639870 100644 --- a/api/server/controllers/agents/callbacks.js +++ b/api/server/controllers/agents/callbacks.js @@ -61,7 +61,10 @@ class ModelEndHandler { } this.collectedUsage.push(usage); - if (!graph.clientOptions?.disableStreaming) { + const streamingDisabled = !!( + graph.clientOptions?.disableStreaming || graph?.boundModel?.disableStreaming + ); + if (!streamingDisabled) { return; } if (!data.output.content) { diff --git a/api/server/controllers/agents/client.js b/api/server/controllers/agents/client.js index 1097ddd39..a506c18ff 100644 --- a/api/server/controllers/agents/client.js +++ b/api/server/controllers/agents/client.js @@ -58,7 +58,7 @@ const payloadParser = ({ req, agent, endpoint }) => { const legacyContentEndpoints = new Set([KnownEndpoints.groq, KnownEndpoints.deepseek]); -const noSystemModelRegex = [/\b(o\d)\b/gi]; +const noSystemModelRegex = [/\b(o1)\b/gi]; // const { processMemory, memoryInstructions } = require('~/server/services/Endpoints/agents/memory'); // const { getFormattedMemories } = require('~/models/Memory'); @@ -728,12 +728,14 @@ class AgentClient extends BaseClient { } if (noSystemMessages === true && systemContent?.length) { - let latestMessage = _messages.pop().content; + const latestMessageContent = _messages.pop().content; if (typeof latestMessage !== 'string') { - latestMessage = latestMessage[0].text; + latestMessageContent[0].text = [systemContent, latestMessageContent[0].text].join('\n'); + _messages.push(new HumanMessage({ content: latestMessageContent })); + } else { + const text = [systemContent, latestMessageContent].join('\n'); + _messages.push(new HumanMessage(text)); } - latestMessage = [systemContent, latestMessage].join('\n'); - _messages.push(new HumanMessage(latestMessage)); } let messages = _messages; diff --git a/api/utils/tokens.js b/api/utils/tokens.js index 6faa097b7..8bf134fa4 100644 --- a/api/utils/tokens.js +++ b/api/utils/tokens.js @@ -60,6 +60,10 @@ const cohereModels = { const googleModels = { /* Max I/O is combined so we subtract the amount from max response tokens for actual total */ + gemma: 8196, + 'gemma-2': 32768, + 'gemma-3': 32768, + 'gemma-3-27b': 131072, gemini: 30720, // -2048 from max 'gemini-pro-vision': 12288, 'gemini-exp': 2000000, diff --git a/client/src/components/Chat/Input/PopoverButtons.tsx b/client/src/components/Chat/Input/PopoverButtons.tsx index 2143a870e..0aa4d842d 100644 --- a/client/src/components/Chat/Input/PopoverButtons.tsx +++ b/client/src/components/Chat/Input/PopoverButtons.tsx @@ -44,7 +44,7 @@ export default function PopoverButtons({ const endpoint = overrideEndpoint ?? endpointType ?? _endpoint ?? ''; const model = overrideModel ?? _model; - const isGenerativeModel = model?.toLowerCase().includes('gemini') ?? false; + const isGenerativeModel = /gemini|learnlm|gemma/.test(model ?? '') ?? false; const isChatModel = (!isGenerativeModel && model?.toLowerCase().includes('chat')) ?? false; const isTextModel = !isGenerativeModel && !isChatModel && /code|text/.test(model ?? ''); @@ -133,7 +133,6 @@ export default function PopoverButtons({ ))} - {/* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition */} {disabled ? null : (
{additionalButtons[settingsView].map((button, index) => ( diff --git a/client/src/components/Endpoints/MessageEndpointIcon.tsx b/client/src/components/Endpoints/MessageEndpointIcon.tsx index 5005641e0..e405c01d3 100644 --- a/client/src/components/Endpoints/MessageEndpointIcon.tsx +++ b/client/src/components/Endpoints/MessageEndpointIcon.tsx @@ -34,10 +34,7 @@ function getOpenAIColor(_model: string | null | undefined) { function getGoogleIcon(model: string | null | undefined, size: number) { if (model?.toLowerCase().includes('code') === true) { return ; - } else if ( - model?.toLowerCase().includes('gemini') === true || - model?.toLowerCase().includes('learnlm') === true - ) { + } else if (/gemini|learnlm|gemma/.test(model?.toLowerCase() ?? '')) { return ; } else { return ; @@ -52,6 +49,8 @@ function getGoogleModelName(model: string | null | undefined) { model?.toLowerCase().includes('learnlm') === true ) { return 'Gemini'; + } else if (model?.toLowerCase().includes('gemma') === true) { + return 'Gemma'; } else { return 'PaLM2'; } diff --git a/package-lock.json b/package-lock.json index 43048ecbc..bb99d9ff5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,12 +59,12 @@ "@google/generative-ai": "^0.23.0", "@googleapis/youtube": "^20.0.0", "@keyv/redis": "^4.3.3", - "@langchain/community": "^0.3.39", - "@langchain/core": "^0.3.43", - "@langchain/google-genai": "^0.2.2", - "@langchain/google-vertexai": "^0.2.3", + "@langchain/community": "^0.3.42", + "@langchain/core": "^0.3.51", + "@langchain/google-genai": "^0.2.5", + "@langchain/google-vertexai": "^0.2.5", "@langchain/textsplitters": "^0.1.0", - "@librechat/agents": "^2.4.22", + "@librechat/agents": "^2.4.30", "@librechat/data-schemas": "*", "@waylaidwanderer/fetch-event-source": "^3.0.1", "axios": "^1.8.2", @@ -106,7 +106,7 @@ "nanoid": "^3.3.7", "nodemailer": "^6.9.15", "ollama": "^0.5.0", - "openai": "^4.47.1", + "openai": "^4.96.2", "openai-chat-tokens": "^0.2.8", "openid-client": "^5.4.2", "passport": "^0.6.0", @@ -171,9 +171,10 @@ } }, "api/node_modules/@langchain/community": { - "version": "0.3.39", - "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.39.tgz", - "integrity": "sha512-8sMJD22bUNlQVoh0b8PgRSpO2Hz5zO6BuZeNY3ElgW3cNVXCoywHW7FBmqbwrygGocJQDee76RqiIN0XQunhTg==", + "version": "0.3.42", + "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.42.tgz", + "integrity": "sha512-dTRoAy4XPalCB4Of5N4uQ8/KSGCddv48OGek8CULtdbBSkQ9s7iWtcb8hQEajkCwMfILVVzw1pU8IzE17oNHPA==", + "license": "MIT", "dependencies": { "@langchain/openai": ">=0.2.0 <0.6.0", "binary-extensions": "^2.2.0", @@ -181,7 +182,7 @@ "flat": "^5.0.2", "js-yaml": "^4.1.0", "langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.0", - "langsmith": ">=0.2.8 <0.4.0", + "langsmith": "^0.3.16", "uuid": "^10.0.0", "zod": "^3.22.3", "zod-to-json-schema": "^3.22.5" @@ -991,32 +992,6 @@ } } }, - "api/node_modules/openai": { - "version": "4.71.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.71.1.tgz", - "integrity": "sha512-C6JNMaQ1eijM0lrjiRUL3MgThVP5RdwNAghpbJFdW0t11LzmyqON8Eh8MuUuEZ+CeD6bgYl2Fkn2BoptVxv9Ug==", - "license": "Apache-2.0", - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7" - }, - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "zod": "^3.23.8" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, "api/node_modules/sharp": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", @@ -16489,11 +16464,12 @@ } }, "node_modules/@langchain/anthropic": { - "version": "0.3.16", - "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.16.tgz", - "integrity": "sha512-O8jhWDsJ175N4p7+ypqMWXMAIT/TRq7NGwMvXGI2IbLPVC7CpjrCZ12yggbYkqzbBDdkVW3bM4fWfINUKWOy2w==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.20.tgz", + "integrity": "sha512-er/mdxdSs8BlQeH5GQtvEIBxf2slge3gsF7CW88S23xfASn6bnjAisQGQwRmvD+X0do7G526W7lNP93u6dMJ0A==", + "license": "MIT", "dependencies": { - "@anthropic-ai/sdk": "^0.37.0", + "@anthropic-ai/sdk": "^0.39.0", "fast-xml-parser": "^4.4.1", "zod": "^3.22.4", "zod-to-json-schema": "^3.22.4" @@ -16502,13 +16478,14 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/anthropic/node_modules/@anthropic-ai/sdk": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.37.0.tgz", - "integrity": "sha512-tHjX2YbkUBwEgg0JZU3EFSSAQPoK4qQR/NFYa8Vtzd5UAyXzZksCw2In69Rml4R/TyHPBfRYaLK35XiOe33pjw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.39.0.tgz", + "integrity": "sha512-eMyDIPRZbt1CCLErRCi3exlAvNkBtRe+kW5vvJyef93PmNr/clstYgHhtvmkxN82nlKgzyGPCyGxrm0JQ1ZIdg==", + "license": "MIT", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -16520,17 +16497,19 @@ } }, "node_modules/@langchain/anthropic/node_modules/@types/node": { - "version": "18.19.79", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.79.tgz", - "integrity": "sha512-90K8Oayimbctc5zTPHPfZloc/lGVs7f3phUAAMcTgEPtg8kKquGZDERC8K4vkBYkQQh48msiYUslYtxTWvqcAg==", + "version": "18.19.87", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.87.tgz", + "integrity": "sha512-OIAAu6ypnVZHmsHCeJ+7CCSub38QNBS9uceMQeg7K5Ur0Jr+wG9wEOEvvMbhp09pxD5czIUy/jND7s7Tb6Nw7A==", + "license": "MIT", "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@langchain/aws": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.7.tgz", - "integrity": "sha512-I5BXnIek1gaorYh/IV9g2M5d9hoyYVUrHJnFGH2gpQM3pqmNcJygOPsFdQKMn0vmNLdm8AqFswX2cv7X+sdrdA==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.9.tgz", + "integrity": "sha512-bF6LJmF16o6wTV6PTFjCnkSMr2GT228k14aBNuw1OpbTOKyr0UdDrD+0k5CBcTFg/YOrzUv0ybJp96fcJMpHIw==", + "license": "MIT", "dependencies": { "@aws-sdk/client-bedrock-agent-runtime": "^3.755.0", "@aws-sdk/client-bedrock-runtime": "^3.755.0", @@ -16543,7 +16522,7 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.3.41 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/aws/node_modules/@aws-sdk/client-sso": { @@ -17399,16 +17378,17 @@ } }, "node_modules/@langchain/core": { - "version": "0.3.43", - "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.43.tgz", - "integrity": "sha512-DwiSUwmZqcuOn7j8SFdeOH1nvaUqG7q8qn3LhobdQYEg5PmjLgd2yLr2KzuT/YWMBfjkOR+Di5K6HEdFmouTxg==", + "version": "0.3.51", + "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.51.tgz", + "integrity": "sha512-2nE30uuomSQrIQKB3BLgQtECZLWj5gwPEzQ+I6Ot6s9DKd133nXp3eZeggkAJ/uuc4WVROYVNJnmxepeAWo02Q==", + "license": "MIT", "dependencies": { "@cfworker/json-schema": "^4.0.2", "ansi-styles": "^5.0.0", "camelcase": "6", "decamelize": "1.2.0", "js-tiktoken": "^1.0.12", - "langsmith": ">=0.2.8 <0.4.0", + "langsmith": "^0.3.16", "mustache": "^4.2.0", "p-queue": "^6.6.2", "p-retry": "4", @@ -17460,9 +17440,10 @@ } }, "node_modules/@langchain/google-common": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.3.tgz", - "integrity": "sha512-8jjLeMp3TeFP3kJbIZnQ9DQ7Sm7P86TA5M3A7c5TdWLrrh5VZXigqGM58YxO3OPMcFHhu2jN3ITqPUHwGCMIRw==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.5.tgz", + "integrity": "sha512-KY6WqPD1pEiSOq8KoXYwrwcCU0vWfHyOe+qgkiJ/1K8adxC2cqysMCQnBrIb1wfW+XiUR6GojC2lhQNuibosTA==", + "license": "MIT", "dependencies": { "uuid": "^10.0.0", "zod-to-json-schema": "^3.22.4" @@ -17471,7 +17452,7 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/google-common/node_modules/uuid": { @@ -17482,29 +17463,32 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/@langchain/google-gauth": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.3.tgz", - "integrity": "sha512-8Bd3yJUntu7RYCwcg5VbjJYyMV3DwrZsbwA0mLPYHxt4k353DuZuiLvR40Vev77cb8GAIXpzvfXA3rHkWFG7nw==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.5.tgz", + "integrity": "sha512-C+DtW3K68tC609pY4MO8MVzKmgfbQ1tRZdHzKL4xoU5WYdBNbP96tuRhPQXMl9WN6qU80JhyXbydmmh8RWbZdQ==", + "license": "MIT", "dependencies": { - "@langchain/google-common": "^0.2.3", + "@langchain/google-common": "^0.2.5", "google-auth-library": "^9.15.1" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/google-genai": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.2.tgz", - "integrity": "sha512-fEuMoOjNoL9fudJmIu8P+ixCX/7n4eB6UT4/NsZubwtbm6BWCjuJWNNPNoHDX6aboXlabwnkuW9oTUy9ia2Ekg==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.5.tgz", + "integrity": "sha512-F+jzFqI4zgLwH69nDLKg0G1OUbRzp8apR3mwJeT1VAxI4CC/ih8nQJ6qqvR4GNurkZKXWFq6T/TVP9v+2vl5FQ==", + "license": "MIT", "dependencies": { "@google/generative-ai": "^0.24.0", "uuid": "^11.1.0", @@ -17514,7 +17498,7 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.3.17 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/google-genai/node_modules/uuid": { @@ -17530,23 +17514,24 @@ } }, "node_modules/@langchain/google-vertexai": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.3.tgz", - "integrity": "sha512-PO/dBoTsWpC7Q7MZ1CnZFYFV6efFdFsaDpE/p4XgK5QwiBBx3sZucJfR/hIcPXOpRgc+nrmiDyDYxcg855gxvA==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.5.tgz", + "integrity": "sha512-RAeRPvny4LUu0YeHjITB7ZcF1jsdgn34QhXldf14ySg+03WB1tKIRNed9eTY7JxAZiRjCKNIn+92mGGR+iavLg==", + "license": "MIT", "dependencies": { - "@langchain/google-gauth": "~0.2.3" + "@langchain/google-gauth": "^0.2.5" }, "engines": { "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.2.21 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@langchain/langgraph": { - "version": "0.2.65", - "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.65.tgz", - "integrity": "sha512-g/Xap2KSEaEBXMJXGZTh31fd0qrdfaWA1l8NJzweJg6AkvVSf+d6DmMk9DtzGW8W1H1qQ2I6FWZ3AdP61Kkaig==", + "version": "0.2.67", + "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.67.tgz", + "integrity": "sha512-tu/ewNIvhIPzeW5GxGzqjmGHinnU/qbNAoLM9czdpci0PCbMysbEJ2pbJrZs7ZjaReWSnr/THkeLPQwqGOM9xw==", "license": "MIT", "dependencies": { "@langchain/langgraph-checkpoint": "~0.0.17", @@ -17596,9 +17581,9 @@ } }, "node_modules/@langchain/langgraph-sdk": { - "version": "0.0.69", - "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.69.tgz", - "integrity": "sha512-I58VmDnab/JwOjos9NdmBM4aDU1Zc5mc4NTinhn7cEeaVDhRRJfVajXKAsvfLLc1tKj4sbf5BS3xARgzNJqajg==", + "version": "0.0.74", + "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.74.tgz", + "integrity": "sha512-IUN0m4BYkGWdviFd4EaWDcQgxNq8z+1LIwXajCSt9B+Cb/pz0ZNpIPdu5hAIsf6a0RWu5yRUhzL1L40t7vu3Zg==", "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.15", @@ -17711,6 +17696,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.1.0.tgz", "integrity": "sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==", + "license": "MIT", "dependencies": { "js-tiktoken": "^1.0.12" }, @@ -17788,22 +17774,22 @@ } }, "node_modules/@librechat/agents": { - "version": "2.4.22", - "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.4.22.tgz", - "integrity": "sha512-BDc4nCssCp9lLmbB/Zc5tzjuzaB3MEF9kKo+kGu28tyoq7K1OCTwZE53/ytbecK6sxi8trT6LpZzpGqcl5AqhA==", + "version": "2.4.30", + "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.4.30.tgz", + "integrity": "sha512-1t8xvuA90x0pYlIf2A+TnAhVYtI/W5K+KutNJ4ePF8p8GoKkaYWK5JDKiJE7arZM+U7vguHDnRHgfoeoC5PkMQ==", "license": "MIT", "dependencies": { - "@langchain/anthropic": "^0.3.16", - "@langchain/aws": "^0.1.7", - "@langchain/community": "^0.3.39", - "@langchain/core": "^0.3.43", + "@langchain/anthropic": "^0.3.20", + "@langchain/aws": "^0.1.9", + "@langchain/community": "^0.3.42", + "@langchain/core": "^0.3.51", "@langchain/deepseek": "^0.0.1", - "@langchain/google-genai": "^0.2.2", - "@langchain/google-vertexai": "^0.2.3", - "@langchain/langgraph": "^0.2.62", + "@langchain/google-genai": "^0.2.5", + "@langchain/google-vertexai": "^0.2.5", + "@langchain/langgraph": "^0.2.67", "@langchain/mistralai": "^0.2.0", "@langchain/ollama": "^0.2.0", - "@langchain/openai": "^0.5.4", + "@langchain/openai": "^0.5.10", "@langchain/xai": "^0.0.2", "dotenv": "^16.4.7", "https-proxy-agent": "^7.0.6", @@ -17814,9 +17800,9 @@ } }, "node_modules/@librechat/agents/node_modules/@langchain/community": { - "version": "0.3.41", - "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.41.tgz", - "integrity": "sha512-i/DQ4bkKW+0W+zFy8ZrH7gRiag3KZuZU15pFXYom7wdZ8zcHJZZh2wi43hiBEWt8asx8Osyx4EhYO5SNp9ewkg==", + "version": "0.3.42", + "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.42.tgz", + "integrity": "sha512-dTRoAy4XPalCB4Of5N4uQ8/KSGCddv48OGek8CULtdbBSkQ9s7iWtcb8hQEajkCwMfILVVzw1pU8IzE17oNHPA==", "license": "MIT", "dependencies": { "@langchain/openai": ">=0.2.0 <0.6.0", @@ -18339,13 +18325,13 @@ } }, "node_modules/@librechat/agents/node_modules/@langchain/openai": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.5.6.tgz", - "integrity": "sha512-zN0iyJthPNmcefIBVybZwcTBgcqu/ElJFov42ZntxEncK4heOMAE9lkq9LQ5CaPU/SgrduibrM1oL57+tLUtaA==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.5.10.tgz", + "integrity": "sha512-hBQIWjcVxGS7tgVvgBBmrZ5jSaJ8nu9g6V64/Tx6KGjkW7VdGmUvqCO+koiQCOZVL7PBJkHWAvDsbghPYXiZEA==", "license": "MIT", "dependencies": { "js-tiktoken": "^1.0.12", - "openai": "^4.93.0", + "openai": "^4.96.0", "zod": "^3.22.4", "zod-to-json-schema": "^3.22.3" }, @@ -18353,7 +18339,7 @@ "node": ">=18" }, "peerDependencies": { - "@langchain/core": ">=0.3.39 <0.4.0" + "@langchain/core": ">=0.3.48 <0.4.0" } }, "node_modules/@librechat/agents/node_modules/agent-base": { @@ -35376,9 +35362,9 @@ } }, "node_modules/openai": { - "version": "4.95.1", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.95.1.tgz", - "integrity": "sha512-IqJy+ymeW+k/Wq+2YVN3693OQMMcODRtHEYOlz263MdUwnN/Dwdl9c2EXSxLLtGEHkSHAfvzpDMHI5MaWJKXjQ==", + "version": "4.96.2", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.96.2.tgz", + "integrity": "sha512-R2XnxvMsizkROr7BV3uNp1q/3skwPZ7fmPjO1bXLnfB4Tu5xKxrT1EVwzjhxn0MZKBKAvOaGWS63jTMN6KrIXA==", "license": "Apache-2.0", "dependencies": { "@types/node": "^18.11.18", diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts index 16459eb0d..dd6cbe87d 100644 --- a/packages/data-provider/src/config.ts +++ b/packages/data-provider/src/config.ts @@ -865,6 +865,7 @@ export const visionModels = [ 'llava-13b', 'gemini-pro-vision', 'claude-3', + 'gemma', 'gemini-exp', 'gemini-1.5', 'gemini-2.0', diff --git a/packages/data-provider/src/parsers.ts b/packages/data-provider/src/parsers.ts index 2389647ee..16a1b86fc 100644 --- a/packages/data-provider/src/parsers.ts +++ b/packages/data-provider/src/parsers.ts @@ -275,6 +275,8 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string => return modelLabel; } else if (model && (model.includes('gemini') || model.includes('learnlm'))) { return 'Gemini'; + } else if (model?.toLowerCase().includes('gemma') === true) { + return 'Gemma'; } else if (model && model.includes('code')) { return 'Codey'; }