fix: disable tool caching entirely to ensure fresh env vars

Temporary fix - always re-import tools so env vars are fresh each request
This commit is contained in:
Ajax Davis 2025-12-15 12:36:26 +10:00
parent 8a79396a0a
commit 9642f0b7e7

View file

@ -439,8 +439,10 @@ async function executeTool(req: Request): Promise<Response> {
// biome-ignore lint/suspicious/noImplicitAnyLet: Tool type is determined dynamically after import
let toolModule;
// Check cache or import
if (moduleCache.has(cacheKey)) {
// CACHE DISABLED - always re-import tools to ensure fresh env vars
// TODO: Re-enable caching with smarter invalidation based on env vars
const CACHE_ENABLED = false;
if (CACHE_ENABLED && moduleCache.has(cacheKey)) {
console.log(`✅ Using cached tool: ${cacheKey}`);
toolModule = moduleCache.get(cacheKey);
} else {