@devries-cameron20 / composio Mirror · read-only / commits / b0f005ca1
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 22:15 UTC

fix(core): omit absent inline custom fields

Abir Taheer committed May 7, 2026 at 02:26 UTC b0f005ca143d0ac1e8887f8e72e2ff523c9f95a0
2 files changed +5 -3
ts/packages/core/src/models/ToolRouter.ts
+2 -2
@@ -265,8 +265,8 @@ export class ToolRouter<
265 : undefined;
266
267 inlineCustomToolsPayload = {
268 - custom_tools: serializedTools,
269 - custom_toolkits: serializedToolkits,
268 + ...(serializedTools ? { custom_tools: serializedTools } : {}),
269 + ...(serializedToolkits ? { custom_toolkits: serializedToolkits } : {}),
270 };
271 }
272
ts/packages/core/test/models/toolRouter.test.ts
+3 -1
@@ -2972,10 +2972,12 @@ describe('ToolRouter', () => {
2972 body: {
2973 experimental: {
2974 custom_tools: [expect.objectContaining({ slug: 'GREP' })],
2975 - custom_toolkits: undefined,
2975 },
2976 },
2977 });
2978 + expect(mockClient.post.mock.calls[0][1].body.experimental).not.toHaveProperty(
2979 + 'custom_toolkits'
2980 + );
2981 expect(mockClient.toolRouter.session.retrieve).not.toHaveBeenCalled();
2982 expect(session.customTools()).toEqual([
2983 expect.objectContaining({