Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🛡️ chore: Enhance Agents Error Handling via `@librechat/[email protected]` (#10577)
Danny Avila4c2719a37e5b
diff --git a/api/package.json b/api/package.jsonindex a6e548bbfb..e5a4525ad1 100644--- a/api/package.json+++ b/api/package.json@@ -47,7 +47,7 @@"@langchain/google-genai": "^0.2.13","@langchain/google-vertexai": "^0.2.13","@langchain/textsplitters": "^0.1.0",- "@librechat/agents": "^3.0.22",+ "@librechat/agents": "^3.0.25","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",diff --git a/api/server/index.js b/api/server/index.jsindex 4f6721eb5c..311b9a796f 100644--- a/api/server/index.js+++ b/api/server/index.js@@ -213,6 +213,17 @@ process.on('uncaughtException', (err) => {return;}+ if (err.stack && err.stack.includes('@librechat/agents')) {+ logger.error(+ '\n\nAn error occurred in the agents system. The error has been logged and the app will continue running.',+ {+ message: err.message,+ stack: err.stack,+ },+ );+ return;+ }+process.exit(1);});diff --git a/package-lock.json b/package-lock.jsonindex dba0f9fc75..e8a1826f86 100644--- a/package-lock.json+++ b/package-lock.json@@ -63,7 +63,7 @@"@langchain/google-genai": "^0.2.13","@langchain/google-vertexai": "^0.2.13","@langchain/textsplitters": "^0.1.0",- "@librechat/agents": "^3.0.22",+ "@librechat/agents": "^3.0.25","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",@@ -15851,9 +15851,9 @@}},"node_modules/@langchain/google-common": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.13.tgz",- "integrity": "sha512-Wd254vAajKxK3bIYPmuFRrk90oN3YIDzwwiO+3ojYKoWP+EBzW3eg3B4f8ofvGXUkJPxEwp/u8ymSsVUElUGlw==",+ "version": "0.2.18",+ "resolved": "https://registry.npmjs.org/@langchain/google-common/-/google-common-0.2.18.tgz",+ "integrity": "sha512-HjWB6Bx4zj7KkiHnqRpx8YNaXdA97sKQMQ17keyWl7nQJlRauNyymm8QGeduKSEfECDr2nGzY8Y/SNY64X6cSA==","license": "MIT","dependencies": {"uuid": "^10.0.0"@@ -15879,12 +15879,12 @@}},"node_modules/@langchain/google-gauth": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.13.tgz",- "integrity": "sha512-JAIMtdmN+6/5aPRz3XUCFQ8+4TP272V8QCLhcyZ9LhDlnmY5DJv+LhzjMk9L5XZx9sRnKRvthVWiAY0Xbs3qAg==",+ "version": "0.2.18",+ "resolved": "https://registry.npmjs.org/@langchain/google-gauth/-/google-gauth-0.2.18.tgz",+ "integrity": "sha512-xof4jBnPB0YI6OlFuETdbODoM05XBTJoC+qQKJ4qNOcWI7u760sRKm57cvG+jzjParojAxdCdrNEKV47wUpoKg==","license": "MIT","dependencies": {- "@langchain/google-common": "^0.2.13",+ "@langchain/google-common": "^0.2.18","google-auth-library": "^10.1.0"},"engines": {@@ -15895,32 +15895,42 @@}},"node_modules/@langchain/google-gauth/node_modules/agent-base": {- "version": "7.1.3",- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",- "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",+ "version": "7.1.4",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==","license": "MIT","engines": {"node": ">= 14"}},+ "node_modules/@langchain/google-gauth/node_modules/brace-expansion": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },"node_modules/@langchain/google-gauth/node_modules/gaxios": {- "version": "7.1.0",- "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.0.tgz",- "integrity": "sha512-y1Q0MX1Ba6eg67Zz92kW0MHHhdtWksYckQy1KJsI6P4UlDQ8cvdvpLEPslD/k7vFkdPppMESFGTvk7XpSiKj8g==",+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz",+ "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==","license": "Apache-2.0","dependencies": {"extend": "^3.0.2","https-proxy-agent": "^7.0.1",- "node-fetch": "^3.3.2"+ "node-fetch": "^3.3.2",+ "rimraf": "^5.0.1"},"engines": {"node": ">=18"}},"node_modules/@langchain/google-gauth/node_modules/gcp-metadata": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-7.0.0.tgz",- "integrity": "sha512-3PfRTzvT3Msu0Hy8Gf9ypxJvaClG2IB9pyH0r8QOmRBW5mUcrHgYpF4GYP+XulDbfhxEhBYtJtJJQb5S2wM+LA==",+ "version": "8.1.2",+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.2.tgz",+ "integrity": "sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==","license": "Apache-2.0","dependencies": {"gaxios": "^7.0.0",@@ -15931,16 +15941,36 @@"node": ">=18"}},+ "node_modules/@langchain/google-gauth/node_modules/glob": {+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",+ "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",+ "license": "ISC",+ "dependencies": {+ "foreground-child": "^3.1.0",+ "jackspeak": "^3.1.2",+ "minimatch": "^9.0.4",+ "minipass": "^7.1.2",+ "package-json-from-dist": "^1.0.0",+ "path-scurry": "^1.11.1"+ },+ "bin": {+ "glob": "dist/esm/bin.mjs"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/@langchain/google-gauth/node_modules/google-auth-library": {- "version": "10.1.0",- "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.1.0.tgz",- "integrity": "sha512-GspVjZj1RbyRWpQ9FbAXMKjFGzZwDKnUHi66JJ+tcjcu5/xYAP1pdlWotCuIkMwjfVsxxDvsGZXGLzRt72D0sQ==",+ "version": "10.5.0",+ "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz",+ "integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==","license": "Apache-2.0","dependencies": {"base64-js": "^1.3.0","ecdsa-sig-formatter": "^1.0.11","gaxios": "^7.0.0",- "gcp-metadata": "^7.0.0",+ "gcp-metadata": "^8.0.0","google-logging-utils": "^1.0.0","gtoken": "^8.0.0","jws": "^4.0.0"@@ -15950,9 +15980,9 @@}},"node_modules/@langchain/google-gauth/node_modules/google-logging-utils": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz",- "integrity": "sha512-rcX58I7nqpu4mbKztFeOAObbomBbHU2oIb/d3tJfF3dizGSApqtSwYJigGCooHdnMyQBIw8BrWyK96w3YXgr6A==",+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.3.tgz",+ "integrity": "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==","license": "Apache-2.0","engines": {"node": ">=14"@@ -15984,6 +16014,36 @@"node": ">= 14"}},+ "node_modules/@langchain/google-gauth/node_modules/jackspeak": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "@isaacs/cliui": "^8.0.2"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ },+ "optionalDependencies": {+ "@pkgjs/parseargs": "^0.11.0"+ }+ },+ "node_modules/@langchain/google-gauth/node_modules/minimatch": {+ "version": "9.0.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/@langchain/google-gauth/node_modules/node-fetch": {"version": "3.3.2","resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",@@ -16002,10 +16062,25 @@"url": "https://opencollective.com/node-fetch"}},+ "node_modules/@langchain/google-gauth/node_modules/rimraf": {+ "version": "5.0.10",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz",+ "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==",+ "license": "ISC",+ "dependencies": {+ "glob": "^10.3.7"+ },+ "bin": {+ "rimraf": "dist/esm/bin.mjs"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/@langchain/google-genai": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.13.tgz",- "integrity": "sha512-ReZe4oNUhPNEijYo9CGA3/CJUwVPaaoYnyplZyYTbUNPAwwRH5aR1e6bppKFBb+ZZeTRCR25JFDIPnXJFfjaBg==",+ "version": "0.2.18",+ "resolved": "https://registry.npmjs.org/@langchain/google-genai/-/google-genai-0.2.18.tgz",+ "integrity": "sha512-m9EiN3VKC01A7/625YQ6Q1Lqq8zueewADX4W5Tcme4RImN75zkg2Z7FYbD1Fo6Zwolc4wBNO6LUtbg3no4rv1Q==","license": "MIT","dependencies": {"@google/generative-ai": "^0.24.0",@@ -16031,12 +16106,12 @@}},"node_modules/@langchain/google-vertexai": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.13.tgz",- "integrity": "sha512-Y97f0IBr4uWsyJTcDJROWXuu+qh4elSDLK1e6MD+mrxCx+UlgcXCReg4zvEFJzqpBKrfFt+lvXstJ6XTR6Zfyg==",+ "version": "0.2.18",+ "resolved": "https://registry.npmjs.org/@langchain/google-vertexai/-/google-vertexai-0.2.18.tgz",+ "integrity": "sha512-oZsOp9Sx4rsFpHH5UiuObo5NYCAqhhmroL3f3pDZ06DB6hpfnNc6XNjdpbmt0AemP6PO/52UlKHeSYtnYlBzIQ==","license": "MIT","dependencies": {- "@langchain/google-gauth": "^0.2.10"+ "@langchain/google-gauth": "^0.2.18"},"engines": {"node": ">=18"@@ -16351,17 +16426,17 @@}},"node_modules/@librechat/agents": {- "version": "3.0.22",- "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.0.22.tgz",- "integrity": "sha512-F55L/McFMeEXZgE3L7Uzujqdc1XNHJCPGlo7ciaiaKYN6MWNj2mcs8/dJbwDvvTdIGjwJKIT5sd3K6ugb1BEVw==",+ "version": "3.0.25",+ "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.0.25.tgz",+ "integrity": "sha512-2TQETX++K75TEEG/30KZdwsPzUljH1MCrKkh55UcHM7OWvUNZCIRlgiWqov731NPwp1bCI3fbXoncbnWzL8NDA==","license": "MIT","dependencies": {"@langchain/anthropic": "^0.3.26","@langchain/aws": "^0.1.15","@langchain/core": "^0.3.79","@langchain/deepseek": "^0.0.2",- "@langchain/google-genai": "^0.2.13",- "@langchain/google-vertexai": "^0.2.13",+ "@langchain/google-genai": "^0.2.18",+ "@langchain/google-vertexai": "^0.2.18","@langchain/langgraph": "^0.4.9","@langchain/mistralai": "^0.2.1","@langchain/ollama": "^0.2.3",@@ -25733,7 +25808,7 @@"version": "6.0.2","resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz","integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",- "dev": true,+ "devOptional": true,"dependencies": {"debug": "4"},@@ -30998,6 +31073,36 @@"node": ">= 14"}},+ "node_modules/gcp-metadata": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz",+ "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "gaxios": "^5.0.0",+ "json-bigint": "^1.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/gcp-metadata/node_modules/gaxios": {+ "version": "5.1.3",+ "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz",+ "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "extend": "^3.0.2",+ "https-proxy-agent": "^5.0.0",+ "is-stream": "^2.0.0",+ "node-fetch": "^2.6.9"+ },+ "engines": {+ "node": ">=12"+ }+ },"node_modules/generic-names": {"version": "4.0.0","resolved": "https://registry.npmjs.org/generic-names/-/generic-names-4.0.0.tgz",@@ -31914,7 +32019,7 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz","integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",- "dev": true,+ "devOptional": true,"dependencies": {"agent-base": "6","debug": "4"@@ -37746,6 +37851,7 @@"version": "1.0.0","resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz","integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",+ "deprecated": "Use your platform's native DOMException instead","funding": [{"type": "github",@@ -37756,6 +37862,7 @@"url": "https://paypal.me/jimmywarting"}],+ "license": "MIT","engines": {"node": ">=10.5.0"}@@ -38417,8 +38524,7 @@"node_modules/package-json-from-dist": {"version": "1.0.1","resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",- "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",- "dev": true+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="},"node_modules/pako": {"version": "1.0.11",@@ -47334,7 +47440,7 @@"@azure/storage-blob": "^12.27.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.79",- "@librechat/agents": "^3.0.22",+ "@librechat/agents": "^3.0.25","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.21.0","axios": "^1.12.1",diff --git a/packages/api/package.json b/packages/api/package.jsonindex 600f88b088..a48d8c74f1 100644--- a/packages/api/package.json+++ b/packages/api/package.json@@ -84,7 +84,7 @@"@azure/storage-blob": "^12.27.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.79",- "@librechat/agents": "^3.0.22",+ "@librechat/agents": "^3.0.25","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.21.0","axios": "^1.12.1",