@devries-cameron20 / composio-1 / commits / cd269efa0
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor(core): remove unnecessary preloadedCustomToolSlugs recomputation

Custom tools are set at create time only — PATCH can't change them, so recomputing the preloaded slugs list after update is dead code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Abir Taheer committed May 7, 2026 at 02:39 UTC cd269efa065bfdda5be071b40d0bd801f6f2123d
1 file changed +1 -6
ts/packages/core/src/models/ToolRouterSession.ts
+1 -6
@@ -51,7 +51,6 @@ import { findCustomToolMapEntryByFinalSlug } from './CustomTool';
51 import { transformProxyParams } from './proxyParamsTransform';
52 import { inlineCustomToolsExperimental } from './inlineCustomToolsPayload';
53 import { transformToolRouterUpdateParams } from '../lib/toolRouterParams';
54 -import { getPreloadedCustomToolSlugs } from './CustomTool';
54
55 const COMPOSIO_MULTI_EXECUTE_TOOL = 'COMPOSIO_MULTI_EXECUTE_TOOL';
56 export const DIRECT_CUSTOM_TOOL_DESCRIPTION_PREFIX =
@@ -68,7 +67,7 @@ export class ToolRouterSession<
67 public preload: ToolRouterSessionPreloadConfig;
68 public configVersion?: number;
69 public warnings: ToolRouterSessionWarning[];
71 - private preloadedCustomToolSlugs: string[];
70 + private readonly preloadedCustomToolSlugs: string[];
71 private readonly inlineCustomToolsPayload: ToolRouterSessionMetadata['inlineCustomToolsPayload'];
72
73 /** Singleton session context — shared across all custom tool executions */
@@ -485,10 +484,6 @@ export class ToolRouterSession<
484 this.configVersion = response.config_version;
485 this.preload = response.config.preload;
486 this.warnings = response.warnings ?? [];
488 - this.preloadedCustomToolSlugs = getPreloadedCustomToolSlugs(
489 - this.customToolsMap,
490 - this.preload.tools === 'all'
491 - );
487 }
488
489 // ── Private helpers ──────────────────────────────────────────