🔧 fix: Google Gemma Support & OpenAI Reasoning Instructions (#7196)

* 🔄 chore: Update @langchain/google-vertexai to version 0.2.5 in package.json and package-lock.json

* chore: temp remove agents

* 🔄 chore: Update @langchain/google-genai to version 0.2.5 in package.json and package-lock.json

* 🔄 chore: Update @langchain/community to version 0.3.42 in package.json and package-lock.json

* 🔄 chore: Add license information for @langchain/textsplitters in package-lock.json

* 🔄 chore: Update @langchain/core to version 0.3.51 in package.json and package-lock.json

* 🔄 chore: Update openai dependency to version 4.96.2 in package.json and package-lock.json

* chore: @librechat/agents to v2.4.30

* fix: streaming condition in ModelEndHandler to account for boundModel `disableStreaming` setting

* fix: update regex for noSystemModel and refactor message handling in AgentClient

* feat: Google Gemma models

* chore: remove unnecessary empty JSX fragment in PopoverButtons component
This commit is contained in:
Danny Avila 2025-05-02 15:11:50 -04:00 committed by GitHub
parent 5d6d13efe8
commit 37b50736bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 120 additions and 121 deletions

View file

@ -140,8 +140,7 @@ class GoogleClient extends BaseClient {
this.options.attachments?.then((attachments) => this.checkVisionRequest(attachments)); this.options.attachments?.then((attachments) => this.checkVisionRequest(attachments));
/** @type {boolean} Whether using a "GenerativeAI" Model */ /** @type {boolean} Whether using a "GenerativeAI" Model */
this.isGenerativeModel = this.isGenerativeModel = /gemini|learnlm|gemma/.test(this.modelOptions.model);
this.modelOptions.model.includes('gemini') || this.modelOptions.model.includes('learnlm');
this.maxContextTokens = this.maxContextTokens =
this.options.maxContextTokens ?? this.options.maxContextTokens ??

View file

@ -111,6 +111,10 @@ const tokenValues = Object.assign(
/* cohere doesn't have rates for the older command models, /* cohere doesn't have rates for the older command models,
so this was from https://artificialanalysis.ai/models/command-light/providers */ so this was from https://artificialanalysis.ai/models/command-light/providers */
command: { prompt: 0.38, completion: 0.38 }, 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-lite': { prompt: 0.075, completion: 0.3 },
'gemini-2.0-flash': { prompt: 0.1, completion: 0.4 }, 'gemini-2.0-flash': { prompt: 0.1, completion: 0.4 },
'gemini-2.0': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing 'gemini-2.0': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing

View file

@ -43,12 +43,12 @@
"@google/generative-ai": "^0.23.0", "@google/generative-ai": "^0.23.0",
"@googleapis/youtube": "^20.0.0", "@googleapis/youtube": "^20.0.0",
"@keyv/redis": "^4.3.3", "@keyv/redis": "^4.3.3",
"@langchain/community": "^0.3.39", "@langchain/community": "^0.3.42",
"@langchain/core": "^0.3.43", "@langchain/core": "^0.3.51",
"@langchain/google-genai": "^0.2.2", "@langchain/google-genai": "^0.2.5",
"@langchain/google-vertexai": "^0.2.3", "@langchain/google-vertexai": "^0.2.5",
"@langchain/textsplitters": "^0.1.0", "@langchain/textsplitters": "^0.1.0",
"@librechat/agents": "^2.4.22", "@librechat/agents": "^2.4.30",
"@librechat/data-schemas": "*", "@librechat/data-schemas": "*",
"@waylaidwanderer/fetch-event-source": "^3.0.1", "@waylaidwanderer/fetch-event-source": "^3.0.1",
"axios": "^1.8.2", "axios": "^1.8.2",
@ -90,7 +90,7 @@
"nanoid": "^3.3.7", "nanoid": "^3.3.7",
"nodemailer": "^6.9.15", "nodemailer": "^6.9.15",
"ollama": "^0.5.0", "ollama": "^0.5.0",
"openai": "^4.47.1", "openai": "^4.96.2",
"openai-chat-tokens": "^0.2.8", "openai-chat-tokens": "^0.2.8",
"openid-client": "^5.4.2", "openid-client": "^5.4.2",
"passport": "^0.6.0", "passport": "^0.6.0",

View file

@ -61,7 +61,10 @@ class ModelEndHandler {
} }
this.collectedUsage.push(usage); this.collectedUsage.push(usage);
if (!graph.clientOptions?.disableStreaming) { const streamingDisabled = !!(
graph.clientOptions?.disableStreaming || graph?.boundModel?.disableStreaming
);
if (!streamingDisabled) {
return; return;
} }
if (!data.output.content) { if (!data.output.content) {

View file

@ -58,7 +58,7 @@ const payloadParser = ({ req, agent, endpoint }) => {
const legacyContentEndpoints = new Set([KnownEndpoints.groq, KnownEndpoints.deepseek]); 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 { processMemory, memoryInstructions } = require('~/server/services/Endpoints/agents/memory');
// const { getFormattedMemories } = require('~/models/Memory'); // const { getFormattedMemories } = require('~/models/Memory');
@ -728,12 +728,14 @@ class AgentClient extends BaseClient {
} }
if (noSystemMessages === true && systemContent?.length) { if (noSystemMessages === true && systemContent?.length) {
let latestMessage = _messages.pop().content; const latestMessageContent = _messages.pop().content;
if (typeof latestMessage !== 'string') { 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; let messages = _messages;

View file

@ -60,6 +60,10 @@ const cohereModels = {
const googleModels = { const googleModels = {
/* Max I/O is combined so we subtract the amount from max response tokens for actual total */ /* 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: 30720, // -2048 from max
'gemini-pro-vision': 12288, 'gemini-pro-vision': 12288,
'gemini-exp': 2000000, 'gemini-exp': 2000000,

View file

@ -44,7 +44,7 @@ export default function PopoverButtons({
const endpoint = overrideEndpoint ?? endpointType ?? _endpoint ?? ''; const endpoint = overrideEndpoint ?? endpointType ?? _endpoint ?? '';
const model = overrideModel ?? _model; 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 isChatModel = (!isGenerativeModel && model?.toLowerCase().includes('chat')) ?? false;
const isTextModel = !isGenerativeModel && !isChatModel && /code|text/.test(model ?? ''); const isTextModel = !isGenerativeModel && !isChatModel && /code|text/.test(model ?? '');
@ -133,7 +133,6 @@ export default function PopoverButtons({
</Button> </Button>
))} ))}
</div> </div>
{/* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition */}
{disabled ? null : ( {disabled ? null : (
<div className="flex w-[150px] items-center justify-end"> <div className="flex w-[150px] items-center justify-end">
{additionalButtons[settingsView].map((button, index) => ( {additionalButtons[settingsView].map((button, index) => (

View file

@ -34,10 +34,7 @@ function getOpenAIColor(_model: string | null | undefined) {
function getGoogleIcon(model: string | null | undefined, size: number) { function getGoogleIcon(model: string | null | undefined, size: number) {
if (model?.toLowerCase().includes('code') === true) { if (model?.toLowerCase().includes('code') === true) {
return <CodeyIcon size={size * 0.75} />; return <CodeyIcon size={size * 0.75} />;
} else if ( } else if (/gemini|learnlm|gemma/.test(model?.toLowerCase() ?? '')) {
model?.toLowerCase().includes('gemini') === true ||
model?.toLowerCase().includes('learnlm') === true
) {
return <GeminiIcon size={size * 0.7} />; return <GeminiIcon size={size * 0.7} />;
} else { } else {
return <PaLMIcon size={size * 0.7} />; return <PaLMIcon size={size * 0.7} />;
@ -52,6 +49,8 @@ function getGoogleModelName(model: string | null | undefined) {
model?.toLowerCase().includes('learnlm') === true model?.toLowerCase().includes('learnlm') === true
) { ) {
return 'Gemini'; return 'Gemini';
} else if (model?.toLowerCase().includes('gemma') === true) {
return 'Gemma';
} else { } else {
return 'PaLM2'; return 'PaLM2';
} }

188
package-lock.json generated
View file

@ -59,12 +59,12 @@
"@google/generative-ai": "^0.23.0", "@google/generative-ai": "^0.23.0",
"@googleapis/youtube": "^20.0.0", "@googleapis/youtube": "^20.0.0",
"@keyv/redis": "^4.3.3", "@keyv/redis": "^4.3.3",
"@langchain/community": "^0.3.39", "@langchain/community": "^0.3.42",
"@langchain/core": "^0.3.43", "@langchain/core": "^0.3.51",
"@langchain/google-genai": "^0.2.2", "@langchain/google-genai": "^0.2.5",
"@langchain/google-vertexai": "^0.2.3", "@langchain/google-vertexai": "^0.2.5",
"@langchain/textsplitters": "^0.1.0", "@langchain/textsplitters": "^0.1.0",
"@librechat/agents": "^2.4.22", "@librechat/agents": "^2.4.30",
"@librechat/data-schemas": "*", "@librechat/data-schemas": "*",
"@waylaidwanderer/fetch-event-source": "^3.0.1", "@waylaidwanderer/fetch-event-source": "^3.0.1",
"axios": "^1.8.2", "axios": "^1.8.2",
@ -106,7 +106,7 @@
"nanoid": "^3.3.7", "nanoid": "^3.3.7",
"nodemailer": "^6.9.15", "nodemailer": "^6.9.15",
"ollama": "^0.5.0", "ollama": "^0.5.0",
"openai": "^4.47.1", "openai": "^4.96.2",
"openai-chat-tokens": "^0.2.8", "openai-chat-tokens": "^0.2.8",
"openid-client": "^5.4.2", "openid-client": "^5.4.2",
"passport": "^0.6.0", "passport": "^0.6.0",
@ -171,9 +171,10 @@
} }
}, },
"api/node_modules/@langchain/community": { "api/node_modules/@langchain/community": {
"version": "0.3.39", "version": "0.3.42",
"resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.39.tgz", "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.42.tgz",
"integrity": "sha512-8sMJD22bUNlQVoh0b8PgRSpO2Hz5zO6BuZeNY3ElgW3cNVXCoywHW7FBmqbwrygGocJQDee76RqiIN0XQunhTg==", "integrity": "sha512-dTRoAy4XPalCB4Of5N4uQ8/KSGCddv48OGek8CULtdbBSkQ9s7iWtcb8hQEajkCwMfILVVzw1pU8IzE17oNHPA==",
"license": "MIT",
"dependencies": { "dependencies": {
"@langchain/openai": ">=0.2.0 <0.6.0", "@langchain/openai": ">=0.2.0 <0.6.0",
"binary-extensions": "^2.2.0", "binary-extensions": "^2.2.0",
@ -181,7 +182,7 @@
"flat": "^5.0.2", "flat": "^5.0.2",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"langchain": ">=0.2.3 <0.3.0 || >=0.3.4 <0.4.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", "uuid": "^10.0.0",
"zod": "^3.22.3", "zod": "^3.22.3",
"zod-to-json-schema": "^3.22.5" "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": { "api/node_modules/sharp": {
"version": "0.33.5", "version": "0.33.5",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
@ -16489,11 +16464,12 @@
} }
}, },
"node_modules/@langchain/anthropic": { "node_modules/@langchain/anthropic": {
"version": "0.3.16", "version": "0.3.20",
"resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.16.tgz", "resolved": "https://registry.npmjs.org/@langchain/anthropic/-/anthropic-0.3.20.tgz",
"integrity": "sha512-O8jhWDsJ175N4p7+ypqMWXMAIT/TRq7NGwMvXGI2IbLPVC7CpjrCZ12yggbYkqzbBDdkVW3bM4fWfINUKWOy2w==", "integrity": "sha512-er/mdxdSs8BlQeH5GQtvEIBxf2slge3gsF7CW88S23xfASn6bnjAisQGQwRmvD+X0do7G526W7lNP93u6dMJ0A==",
"license": "MIT",
"dependencies": { "dependencies": {
"@anthropic-ai/sdk": "^0.37.0", "@anthropic-ai/sdk": "^0.39.0",
"fast-xml-parser": "^4.4.1", "fast-xml-parser": "^4.4.1",
"zod": "^3.22.4", "zod": "^3.22.4",
"zod-to-json-schema": "^3.22.4" "zod-to-json-schema": "^3.22.4"
@ -16502,13 +16478,14 @@
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "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": { "node_modules/@langchain/anthropic/node_modules/@anthropic-ai/sdk": {
"version": "0.37.0", "version": "0.39.0",
"resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.37.0.tgz", "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.39.0.tgz",
"integrity": "sha512-tHjX2YbkUBwEgg0JZU3EFSSAQPoK4qQR/NFYa8Vtzd5UAyXzZksCw2In69Rml4R/TyHPBfRYaLK35XiOe33pjw==", "integrity": "sha512-eMyDIPRZbt1CCLErRCi3exlAvNkBtRe+kW5vvJyef93PmNr/clstYgHhtvmkxN82nlKgzyGPCyGxrm0JQ1ZIdg==",
"license": "MIT",
"dependencies": { "dependencies": {
"@types/node": "^18.11.18", "@types/node": "^18.11.18",
"@types/node-fetch": "^2.6.4", "@types/node-fetch": "^2.6.4",
@ -16520,17 +16497,19 @@
} }
}, },
"node_modules/@langchain/anthropic/node_modules/@types/node": { "node_modules/@langchain/anthropic/node_modules/@types/node": {
"version": "18.19.79", "version": "18.19.87",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.79.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.87.tgz",
"integrity": "sha512-90K8Oayimbctc5zTPHPfZloc/lGVs7f3phUAAMcTgEPtg8kKquGZDERC8K4vkBYkQQh48msiYUslYtxTWvqcAg==", "integrity": "sha512-OIAAu6ypnVZHmsHCeJ+7CCSub38QNBS9uceMQeg7K5Ur0Jr+wG9wEOEvvMbhp09pxD5czIUy/jND7s7Tb6Nw7A==",
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
}, },
"node_modules/@langchain/aws": { "node_modules/@langchain/aws": {
"version": "0.1.7", "version": "0.1.9",
"resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.7.tgz", "resolved": "https://registry.npmjs.org/@langchain/aws/-/aws-0.1.9.tgz",
"integrity": "sha512-I5BXnIek1gaorYh/IV9g2M5d9hoyYVUrHJnFGH2gpQM3pqmNcJygOPsFdQKMn0vmNLdm8AqFswX2cv7X+sdrdA==", "integrity": "sha512-bF6LJmF16o6wTV6PTFjCnkSMr2GT228k14aBNuw1OpbTOKyr0UdDrD+0k5CBcTFg/YOrzUv0ybJp96fcJMpHIw==",
"license": "MIT",
"dependencies": { "dependencies": {
"@aws-sdk/client-bedrock-agent-runtime": "^3.755.0", "@aws-sdk/client-bedrock-agent-runtime": "^3.755.0",
"@aws-sdk/client-bedrock-runtime": "^3.755.0", "@aws-sdk/client-bedrock-runtime": "^3.755.0",
@ -16543,7 +16522,7 @@
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "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": { "node_modules/@langchain/aws/node_modules/@aws-sdk/client-sso": {
@ -17399,16 +17378,17 @@
} }
}, },
"node_modules/@langchain/core": { "node_modules/@langchain/core": {
"version": "0.3.43", "version": "0.3.51",
"resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.43.tgz", "resolved": "https://registry.npmjs.org/@langchain/core/-/core-0.3.51.tgz",
"integrity": "sha512-DwiSUwmZqcuOn7j8SFdeOH1nvaUqG7q8qn3LhobdQYEg5PmjLgd2yLr2KzuT/YWMBfjkOR+Di5K6HEdFmouTxg==", "integrity": "sha512-2nE30uuomSQrIQKB3BLgQtECZLWj5gwPEzQ+I6Ot6s9DKd133nXp3eZeggkAJ/uuc4WVROYVNJnmxepeAWo02Q==",
"license": "MIT",
"dependencies": { "dependencies": {
"@cfworker/json-schema": "^4.0.2", "@cfworker/json-schema": "^4.0.2",
"ansi-styles": "^5.0.0", "ansi-styles": "^5.0.0",
"camelcase": "6", "camelcase": "6",
"decamelize": "1.2.0", "decamelize": "1.2.0",
"js-tiktoken": "^1.0.12", "js-tiktoken": "^1.0.12",
"langsmith": ">=0.2.8 <0.4.0", "langsmith": "^0.3.16",
"mustache": "^4.2.0", "mustache": "^4.2.0",
"p-queue": "^6.6.2", "p-queue": "^6.6.2",
"p-retry": "4", "p-retry": "4",
@ -17460,9 +17440,10 @@
} }
}, },
"node_modules/@langchain/google-common": { "node_modules/@langchain/google-common": {
"version": "0.2.3", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.3.tgz", "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.5.tgz",
"integrity": "sha512-8jjLeMp3TeFP3kJbIZnQ9DQ7Sm7P86TA5M3A7c5TdWLrrh5VZXigqGM58YxO3OPMcFHhu2jN3ITqPUHwGCMIRw==", "integrity": "sha512-KY6WqPD1pEiSOq8KoXYwrwcCU0vWfHyOe+qgkiJ/1K8adxC2cqysMCQnBrIb1wfW+XiUR6GojC2lhQNuibosTA==",
"license": "MIT",
"dependencies": { "dependencies": {
"uuid": "^10.0.0", "uuid": "^10.0.0",
"zod-to-json-schema": "^3.22.4" "zod-to-json-schema": "^3.22.4"
@ -17471,7 +17452,7 @@
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "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": { "node_modules/@langchain/google-common/node_modules/uuid": {
@ -17482,29 +17463,32 @@
"https://github.com/sponsors/broofa", "https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan" "https://github.com/sponsors/ctavan"
], ],
"license": "MIT",
"bin": { "bin": {
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
}, },
"node_modules/@langchain/google-gauth": { "node_modules/@langchain/google-gauth": {
"version": "0.2.3", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.3.tgz", "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.5.tgz",
"integrity": "sha512-8Bd3yJUntu7RYCwcg5VbjJYyMV3DwrZsbwA0mLPYHxt4k353DuZuiLvR40Vev77cb8GAIXpzvfXA3rHkWFG7nw==", "integrity": "sha512-C+DtW3K68tC609pY4MO8MVzKmgfbQ1tRZdHzKL4xoU5WYdBNbP96tuRhPQXMl9WN6qU80JhyXbydmmh8RWbZdQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"@langchain/google-common": "^0.2.3", "@langchain/google-common": "^0.2.5",
"google-auth-library": "^9.15.1" "google-auth-library": "^9.15.1"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "peerDependencies": {
"@langchain/core": ">=0.2.21 <0.4.0" "@langchain/core": ">=0.3.48 <0.4.0"
} }
}, },
"node_modules/@langchain/google-genai": { "node_modules/@langchain/google-genai": {
"version": "0.2.2", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.2.tgz", "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.5.tgz",
"integrity": "sha512-fEuMoOjNoL9fudJmIu8P+ixCX/7n4eB6UT4/NsZubwtbm6BWCjuJWNNPNoHDX6aboXlabwnkuW9oTUy9ia2Ekg==", "integrity": "sha512-F+jzFqI4zgLwH69nDLKg0G1OUbRzp8apR3mwJeT1VAxI4CC/ih8nQJ6qqvR4GNurkZKXWFq6T/TVP9v+2vl5FQ==",
"license": "MIT",
"dependencies": { "dependencies": {
"@google/generative-ai": "^0.24.0", "@google/generative-ai": "^0.24.0",
"uuid": "^11.1.0", "uuid": "^11.1.0",
@ -17514,7 +17498,7 @@
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "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": { "node_modules/@langchain/google-genai/node_modules/uuid": {
@ -17530,23 +17514,24 @@
} }
}, },
"node_modules/@langchain/google-vertexai": { "node_modules/@langchain/google-vertexai": {
"version": "0.2.3", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.3.tgz", "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.5.tgz",
"integrity": "sha512-PO/dBoTsWpC7Q7MZ1CnZFYFV6efFdFsaDpE/p4XgK5QwiBBx3sZucJfR/hIcPXOpRgc+nrmiDyDYxcg855gxvA==", "integrity": "sha512-RAeRPvny4LUu0YeHjITB7ZcF1jsdgn34QhXldf14ySg+03WB1tKIRNed9eTY7JxAZiRjCKNIn+92mGGR+iavLg==",
"license": "MIT",
"dependencies": { "dependencies": {
"@langchain/google-gauth": "~0.2.3" "@langchain/google-gauth": "^0.2.5"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "peerDependencies": {
"@langchain/core": ">=0.2.21 <0.4.0" "@langchain/core": ">=0.3.48 <0.4.0"
} }
}, },
"node_modules/@langchain/langgraph": { "node_modules/@langchain/langgraph": {
"version": "0.2.65", "version": "0.2.67",
"resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.65.tgz", "resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-0.2.67.tgz",
"integrity": "sha512-g/Xap2KSEaEBXMJXGZTh31fd0qrdfaWA1l8NJzweJg6AkvVSf+d6DmMk9DtzGW8W1H1qQ2I6FWZ3AdP61Kkaig==", "integrity": "sha512-tu/ewNIvhIPzeW5GxGzqjmGHinnU/qbNAoLM9czdpci0PCbMysbEJ2pbJrZs7ZjaReWSnr/THkeLPQwqGOM9xw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@langchain/langgraph-checkpoint": "~0.0.17", "@langchain/langgraph-checkpoint": "~0.0.17",
@ -17596,9 +17581,9 @@
} }
}, },
"node_modules/@langchain/langgraph-sdk": { "node_modules/@langchain/langgraph-sdk": {
"version": "0.0.69", "version": "0.0.74",
"resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.69.tgz", "resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.74.tgz",
"integrity": "sha512-I58VmDnab/JwOjos9NdmBM4aDU1Zc5mc4NTinhn7cEeaVDhRRJfVajXKAsvfLLc1tKj4sbf5BS3xARgzNJqajg==", "integrity": "sha512-IUN0m4BYkGWdviFd4EaWDcQgxNq8z+1LIwXajCSt9B+Cb/pz0ZNpIPdu5hAIsf6a0RWu5yRUhzL1L40t7vu3Zg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
@ -17711,6 +17696,7 @@
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.1.0.tgz", "resolved": "https://registry.npmjs.org/@langchain/textsplitters/-/textsplitters-0.1.0.tgz",
"integrity": "sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==", "integrity": "sha512-djI4uw9rlkAb5iMhtLED+xJebDdAG935AdP4eRTB02R7OB/act55Bj9wsskhZsvuyQRpO4O1wQOp85s6T6GWmw==",
"license": "MIT",
"dependencies": { "dependencies": {
"js-tiktoken": "^1.0.12" "js-tiktoken": "^1.0.12"
}, },
@ -17788,22 +17774,22 @@
} }
}, },
"node_modules/@librechat/agents": { "node_modules/@librechat/agents": {
"version": "2.4.22", "version": "2.4.30",
"resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.4.22.tgz", "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-2.4.30.tgz",
"integrity": "sha512-BDc4nCssCp9lLmbB/Zc5tzjuzaB3MEF9kKo+kGu28tyoq7K1OCTwZE53/ytbecK6sxi8trT6LpZzpGqcl5AqhA==", "integrity": "sha512-1t8xvuA90x0pYlIf2A+TnAhVYtI/W5K+KutNJ4ePF8p8GoKkaYWK5JDKiJE7arZM+U7vguHDnRHgfoeoC5PkMQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@langchain/anthropic": "^0.3.16", "@langchain/anthropic": "^0.3.20",
"@langchain/aws": "^0.1.7", "@langchain/aws": "^0.1.9",
"@langchain/community": "^0.3.39", "@langchain/community": "^0.3.42",
"@langchain/core": "^0.3.43", "@langchain/core": "^0.3.51",
"@langchain/deepseek": "^0.0.1", "@langchain/deepseek": "^0.0.1",
"@langchain/google-genai": "^0.2.2", "@langchain/google-genai": "^0.2.5",
"@langchain/google-vertexai": "^0.2.3", "@langchain/google-vertexai": "^0.2.5",
"@langchain/langgraph": "^0.2.62", "@langchain/langgraph": "^0.2.67",
"@langchain/mistralai": "^0.2.0", "@langchain/mistralai": "^0.2.0",
"@langchain/ollama": "^0.2.0", "@langchain/ollama": "^0.2.0",
"@langchain/openai": "^0.5.4", "@langchain/openai": "^0.5.10",
"@langchain/xai": "^0.0.2", "@langchain/xai": "^0.0.2",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"https-proxy-agent": "^7.0.6", "https-proxy-agent": "^7.0.6",
@ -17814,9 +17800,9 @@
} }
}, },
"node_modules/@librechat/agents/node_modules/@langchain/community": { "node_modules/@librechat/agents/node_modules/@langchain/community": {
"version": "0.3.41", "version": "0.3.42",
"resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.41.tgz", "resolved": "https://registry.npmjs.org/@langchain/community/-/community-0.3.42.tgz",
"integrity": "sha512-i/DQ4bkKW+0W+zFy8ZrH7gRiag3KZuZU15pFXYom7wdZ8zcHJZZh2wi43hiBEWt8asx8Osyx4EhYO5SNp9ewkg==", "integrity": "sha512-dTRoAy4XPalCB4Of5N4uQ8/KSGCddv48OGek8CULtdbBSkQ9s7iWtcb8hQEajkCwMfILVVzw1pU8IzE17oNHPA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@langchain/openai": ">=0.2.0 <0.6.0", "@langchain/openai": ">=0.2.0 <0.6.0",
@ -18339,13 +18325,13 @@
} }
}, },
"node_modules/@librechat/agents/node_modules/@langchain/openai": { "node_modules/@librechat/agents/node_modules/@langchain/openai": {
"version": "0.5.6", "version": "0.5.10",
"resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.5.6.tgz", "resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-0.5.10.tgz",
"integrity": "sha512-zN0iyJthPNmcefIBVybZwcTBgcqu/ElJFov42ZntxEncK4heOMAE9lkq9LQ5CaPU/SgrduibrM1oL57+tLUtaA==", "integrity": "sha512-hBQIWjcVxGS7tgVvgBBmrZ5jSaJ8nu9g6V64/Tx6KGjkW7VdGmUvqCO+koiQCOZVL7PBJkHWAvDsbghPYXiZEA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"js-tiktoken": "^1.0.12", "js-tiktoken": "^1.0.12",
"openai": "^4.93.0", "openai": "^4.96.0",
"zod": "^3.22.4", "zod": "^3.22.4",
"zod-to-json-schema": "^3.22.3" "zod-to-json-schema": "^3.22.3"
}, },
@ -18353,7 +18339,7 @@
"node": ">=18" "node": ">=18"
}, },
"peerDependencies": { "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": { "node_modules/@librechat/agents/node_modules/agent-base": {
@ -35376,9 +35362,9 @@
} }
}, },
"node_modules/openai": { "node_modules/openai": {
"version": "4.95.1", "version": "4.96.2",
"resolved": "https://registry.npmjs.org/openai/-/openai-4.95.1.tgz", "resolved": "https://registry.npmjs.org/openai/-/openai-4.96.2.tgz",
"integrity": "sha512-IqJy+ymeW+k/Wq+2YVN3693OQMMcODRtHEYOlz263MdUwnN/Dwdl9c2EXSxLLtGEHkSHAfvzpDMHI5MaWJKXjQ==", "integrity": "sha512-R2XnxvMsizkROr7BV3uNp1q/3skwPZ7fmPjO1bXLnfB4Tu5xKxrT1EVwzjhxn0MZKBKAvOaGWS63jTMN6KrIXA==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@types/node": "^18.11.18", "@types/node": "^18.11.18",

View file

@ -865,6 +865,7 @@ export const visionModels = [
'llava-13b', 'llava-13b',
'gemini-pro-vision', 'gemini-pro-vision',
'claude-3', 'claude-3',
'gemma',
'gemini-exp', 'gemini-exp',
'gemini-1.5', 'gemini-1.5',
'gemini-2.0', 'gemini-2.0',

View file

@ -275,6 +275,8 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
return modelLabel; return modelLabel;
} else if (model && (model.includes('gemini') || model.includes('learnlm'))) { } else if (model && (model.includes('gemini') || model.includes('learnlm'))) {
return 'Gemini'; return 'Gemini';
} else if (model?.toLowerCase().includes('gemma') === true) {
return 'Gemma';
} else if (model && model.includes('code')) { } else if (model && model.includes('code')) {
return 'Codey'; return 'Codey';
} }