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 22, 00:45 UTC
fix: update test assertion and Python alias param for CI
- Test: check multi_account is undefined instead of property absence - Python: use **kwargs for alias param not yet in Python client types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
abir committed
Apr 9, 2026 at 22:47 UTC
97b996474cf1276d124a5e9b5de7a757c6a206e7
2 files changed
+9
-7
python/composio/core/models/tool_router_session.py
+8
-6
@@ -396,12 +396,14 @@ class ToolRouterSession(t.Generic[TTool, TToolCollection]):
396
:param alias: Human-readable alias for the connection. Must be unique
397
per userId and toolkit within the project.
398
"""
399
- response = self._client.tool_router.session.link(
400
- session_id=self.session_id,
401
- toolkit=toolkit,
402
- callback_url=callback_url if callback_url else omit,
403
- alias=alias if alias is not None else omit,
404
- )
399
+ link_params: dict = {
400
+ "session_id": self.session_id,
401
+ "toolkit": toolkit,
402
+ "callback_url": callback_url if callback_url else omit,
403
+ }
404
+ if alias is not None:
405
+ link_params["alias"] = alias
406
+ response = self._client.tool_router.session.link(**link_params) # type: ignore[arg-type]
407
return ConnectionRequest(
408
id=response.connected_account_id,
409
redirect_url=response.redirect_url,
ts/packages/core/test/models/toolRouter.test.ts
+1
-1
@@ -1266,7 +1266,7 @@ describe('ToolRouter', () => {
1266
await toolRouter.create(userId, {});
1267
1268
const callArgs = mockClient.toolRouter.session.create.mock.calls[0][0];
1269
- expect(callArgs).not.toHaveProperty('multi_account');
1269
+ expect(callArgs.multi_account).toBeUndefined();
1270
});
1271
1272
it('should create a session with multiAccount combined with other options', async () => {