Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix: skip classmethods from the trace wrapper
angrybayblade committed
Aug 15, 2025 at 10:09 UTC
dcc1cb67aa59e56f4856cfc2394c79d93d7c2d3d
2 files changed
+6
-8
python/composio/core/models/base.py
+4
@@ -24,6 +24,10 @@ _environment = os.getenv("ENVIRONMENT", "development")
24
def trace_method(method: t.Callable, name: str, **attributes: t.Any) -> t.Callable:
25
"""Wrap a method to log the call."""
26
27
+ # Check if the method is a class method
28
+ if getattr(method, "__self__", None) is not None:
29
+ return method
30
+
31
@functools.wraps(method)
32
def trace_wrapper(self, *args, **kwargs):
33
if not allow_tracking.get():
python/composio/core/models/connected_accounts.py
+2
-8
@@ -360,16 +360,10 @@ class ConnectedAccounts:
360
"""
361
Wait for connected account with given ID to be active
362
"""
363
- # Get the connection status first
364
- connection = self._client.connected_accounts.retrieve(nanoid=id)
365
- # Create a ConnectionRequest instance
366
- connection_request = ConnectionRequest(
363
+ return ConnectionRequest.from_id(
364
id=id,
368
- status=connection.status,
369
- redirect_url=None,
365
client=self._client,
371
- )
372
- return connection_request.wait_for_connection(
366
+ ).wait_for_connection(
367
timeout=timeout,
368
)
369