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
🧰 refactor: Default TTL for Cached Tools (#11033)
Danny Avila9dda857a59b5
diff --git a/api/server/services/Config/getCachedTools.js b/api/server/services/Config/getCachedTools.jsindex 841ca04c94..cf1618a646 100644--- a/api/server/services/Config/getCachedTools.js+++ b/api/server/services/Config/getCachedTools.js@@ -1,4 +1,4 @@-const { CacheKeys } = require('librechat-data-provider');+const { CacheKeys, Time } = require('librechat-data-provider');const getLogStores = require('~/cache/getLogStores');/**@@ -39,12 +39,12 @@ async function getCachedTools(options = {}) {* @param {Object} options - Options for caching tools* @param {string} [options.userId] - User ID for user-specific MCP tools* @param {string} [options.serverName] - MCP server name for server-specific tools- * @param {number} [options.ttl] - Time to live in milliseconds+ * @param {number} [options.ttl] - Time to live in milliseconds (default: 12 hours)* @returns {Promise<boolean>} Whether the operation was successful*/async function setCachedTools(tools, options = {}) {const cache = getLogStores(CacheKeys.CONFIG_STORE);- const { userId, serverName, ttl } = options;+ const { userId, serverName, ttl = Time.TWELVE_HOURS } = options;// Cache by MCP server if specified (requires userId)if (serverName && userId) {diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.tsindex d21a64ab6a..1a12507e68 100644--- a/packages/data-provider/src/config.ts+++ b/packages/data-provider/src/config.ts@@ -1239,6 +1239,7 @@ export enum InfiniteCollections {*/export enum Time {ONE_DAY = 86400000,+ TWELVE_HOURS = 43200000,ONE_HOUR = 3600000,THIRTY_MINUTES = 1800000,TEN_MINUTES = 600000,