Skip to content

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(tool-router): use generated execute offload params

Dhawal Upadhyayfed23cdc5651
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 491570cb7..87376f1dc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -25,8 +25,8 @@ catalogs:
specifier: ^4.20250917.0
version: 4.20260218.0
'@composio/client':
- specifier: 0.1.0-alpha.67
- version: 0.1.0-alpha.67
+ specifier: 0.1.0-alpha.68
+ version: 0.1.0-alpha.68
'@effect/cli':
specifier: ^0.73.2
version: 0.73.2
@@ -1073,7 +1073,7 @@ importers:
version: link:../cli-keyring
'@composio/client':
specifier: 'catalog:'
- version: 0.1.0-alpha.67
+ version: 0.1.0-alpha.68
'@composio/core':
specifier: workspace:*
version: link:../core
@@ -1209,7 +1209,7 @@ importers:
dependencies:
'@composio/client':
specifier: 'catalog:'
- version: 0.1.0-alpha.67
+ version: 0.1.0-alpha.68
'@composio/json-schema-to-zod':
specifier: workspace:*
version: link:../json-schema-to-zod
@@ -1872,8 +1872,8 @@ packages:
resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
engines: {node: '>=0.1.90'}
- '@composio/[email protected]':
- resolution: {integrity: sha512-is+P3W4I8mTPk2Wx0TaJRBbld+2sUjhXsEi8PegkX08TS4cpLTPcFzJLkEtUptSmLf0jJBbkEtmRZT9wTgpu4g==}
+ '@composio/[email protected]':
+ resolution: {integrity: sha512-hym21PsIELzlF0Fc9RASr3PfGR1alpGE8IlbRJU3ED6UllMZz7VzREsKUZfojG4yHjZMBlVXG5QGMBzuPEue3Q==}
'@cspotcode/[email protected]':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
@@ -7235,7 +7235,7 @@ snapshots:
'@colors/[email protected]':
optional: true
- '@composio/[email protected]': {}
+ '@composio/[email protected]': {}
'@cspotcode/[email protected]':
dependencies:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 37b35360b..49b9f0bf6 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -21,7 +21,7 @@ catalog:
'@clack/prompts': '^1.0.1'
'@cloudflare/vitest-pool-workers': ^0.9.2
'@cloudflare/workers-types': ^4.20250917.0
- '@composio/client': 0.1.0-alpha.67
+ '@composio/client': 0.1.0-alpha.68
'@effect/cli': ^0.73.2
'@effect/eslint-plugin': ^0.3.2
'@effect/language-service': ^0.74.0
diff --git a/python/composio/core/models/tools.py b/python/composio/core/models/tools.py
index a5bf6ce5f..2bfb598c9 100644
--- a/python/composio/core/models/tools.py
+++ b/python/composio/core/models/tools.py
@@ -525,7 +525,7 @@ class Tools(Resource, t.Generic[TTool, TToolCollection]):
arguments=processed_arguments,
# Provider-wrapped session tools are agentic calls, so they opt into
# direct tool offload when the backend session workbench allows it.
- extra_body={"enable_auto_workbench_offload": True},
+ enable_auto_workbench_offload=True,
)
# Convert response to standard format
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 9baa31090..fa75e4bdc 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -7,7 +7,7 @@ requires-python = ">=3.10,<4"
dependencies = [
"pysher>=1.0.8",
"pydantic>=2.6.4",
- "composio-client==1.34.0",
+ "composio-client==1.35.0",
"typing-extensions>=4.0.0",
"openai",
"json-schema-to-pydantic>=0.4.8",
diff --git a/python/setup.py b/python/setup.py
index c340a5c30..73e0f6340 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -25,7 +25,7 @@ setup(
install_requires=[
"pysher>=1.0.8",
"pydantic>=2.6.4",
- "composio-client==1.33.0",
+ "composio-client==1.35.0",
"typing-extensions>=4.0.0",
"openai",
"json-schema-to-pydantic>=0.4.8",
diff --git a/python/tests/test_custom_tools.py b/python/tests/test_custom_tools.py
index 04b91fa7c..31170586b 100644
--- a/python/tests/test_custom_tools.py
+++ b/python/tests/test_custom_tools.py
@@ -617,6 +617,7 @@ class TestToolRouterSessionCustomTools:
assert call_args.kwargs["tool_slug"] == "GMAIL_SEND_EMAIL"
assert call_args.kwargs["arguments"] == {"to": "[email protected]"}
assert "extra_body" not in call_args.kwargs
+ assert "enable_auto_workbench_offload" not in call_args.kwargs
# Remote returns client model as-is (backward compat, supports attribute access)
assert isinstance(result, SessionExecuteResponse)
assert result.data == {"sent": True}
diff --git a/python/tests/test_tool_router.py b/python/tests/test_tool_router.py
index 8689adac2..36fa8d0bd 100644
--- a/python/tests/test_tool_router.py
+++ b/python/tests/test_tool_router.py
@@ -1369,7 +1369,7 @@ class TestToolRouterExecution:
session_id="session_123",
tool_slug="GMAIL_SEND_EMAIL",
arguments={"to": "[email protected]"},
- extra_body={"enable_auto_workbench_offload": True},
+ enable_auto_workbench_offload=True,
)
# Verify result format
@@ -1427,7 +1427,7 @@ class TestToolRouterExecution:
mock_client.tool_router.session.execute.assert_called_once()
call_args = mock_client.tool_router.session.execute.call_args
assert call_args.kwargs["arguments"] == {"to": "[email protected]"}
- assert call_args.kwargs["extra_body"] == {"enable_auto_workbench_offload": True}
+ assert call_args.kwargs["enable_auto_workbench_offload"] is True
# Verify result was modified by after_execute
assert result["data"] == {"modified": True}
diff --git a/ts/packages/core/src/models/Tools.ts b/ts/packages/core/src/models/Tools.ts
index 7e502f839..065595aa6 100644
--- a/ts/packages/core/src/models/Tools.ts
+++ b/ts/packages/core/src/models/Tools.ts
@@ -54,15 +54,11 @@ import { telemetry } from '../telemetry/Telemetry';
import { ComposioConfig } from '../composio';
import { getToolkitVersion } from '../utils/toolkitVersion';
import { handleToolExecutionError } from '../errors/ToolErrors';
-import { SessionExecuteParams } from '@composio/client/resources/tool-router.mjs';
+import type { SessionExecuteParams } from '@composio/client/resources/tool-router.mjs';
import { CONFIG_DEFAULTS } from '../utils/config-defaults';
import { resolveEffectiveUploadAllowlist } from '../utils/fileDirs';
import { schemaHasFileUploadable } from '../utils/modifiers/FileToolModifier.utils.neutral';
-type SessionExecuteParamsWithAutoOffload = SessionExecuteParams & {
- enable_auto_workbench_offload?: boolean;
-};
-
/**
* This class is used to manage tools in the Composio SDK.
* It provides methods to list, get, and execute tools.
@@ -1040,7 +1036,7 @@ export class Tools<
});
}
- const executePayload: SessionExecuteParamsWithAutoOffload = {
+ const executePayload: SessionExecuteParams = {
tool_slug: toolSlug,
arguments: modifiedParams,
// Provider-wrapped session tools are agentic calls, so they opt into
diff --git a/uv.lock b/uv.lock
index bf8605c76..7370a1072 100644
--- a/uv.lock
+++ b/uv.lock
@@ -621,7 +621,7 @@ dev = [
[package.metadata]
requires-dist = [
- { name = "composio-client", specifier = "==1.34.0" },
+ { name = "composio-client", specifier = "==1.35.0" },
{ name = "json-schema-to-pydantic", specifier = ">=0.4.8" },
{ name = "openai" },
{ name = "pydantic", specifier = ">=2.6.4" },
@@ -663,7 +663,7 @@ requires-dist = [
[[package]]
name = "composio-client"
-version = "1.34.0"
+version = "1.35.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "anyio" },
@@ -673,9 +673,9 @@ dependencies = [
{ name = "sniffio" },
{ name = "typing-extensions" },
]
-sdist = { url = "https://files.pythonhosted.org/packages/83/f4/4d860bf054152780c39d1b8a0298dbffa807b8baaf93bdabd6e8eb16ff07/composio_client-1.34.0.tar.gz", hash = "sha256:02880cfdee87c4e62ab4091c8ec783e94949d8df112323c723234786d4413eda", size = 230198, upload-time = "2026-04-28T10:57:18.629Z" }
+sdist = { url = "https://files.pythonhosted.org/packages/d5/8c/986ba4eca8c54b4a4d684dd4b9af07f813a4d19cc0dcef6c3e150befcd5e/composio_client-1.35.0.tar.gz", hash = "sha256:05f195aec2f5706a057848c855ab31b94b00d78283dd9ed0d9a02d316f2acff8", size = 231383, upload-time = "2026-04-30T12:15:20.413Z" }
wheels = [
- { url = "https://files.pythonhosted.org/packages/c6/54/ddf4c1110a247c52e980dd8503f38afd813e1678f102339aed91e8b643ae/composio_client-1.34.0-py3-none-any.whl", hash = "sha256:93dc2e16b26dc64330091a24fd55858896e490bc93f9d476d7e01703db84aeab", size = 256540, upload-time = "2026-04-28T10:57:16.967Z" },
+ { url = "https://files.pythonhosted.org/packages/58/a3/5d1ab2daded174b811af8ec5539ed35a1e7f8dbcd7ab47779a787487a4fb/composio_client-1.35.0-py3-none-any.whl", hash = "sha256:59b909867a098ba89f513464c0889cfcf1817c707c729faeee665b5b2590e557", size = 257695, upload-time = "2026-04-30T12:15:18.76Z" },
]
[[package]]