🔧 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

188
package-lock.json generated
View file

@ -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",