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

next
mdx 53 lines 2.46 KB
Raw
1 ---
2 title: "Adds Version Checks for Tool Execution and Improved Execution Speed in TS SDK"
3 description: "Version validation for manual tool execution and performance improvements"
4 date: "2025-10-22"
5 ---
6
7
8 ### Summary
9 Added version validation for manual tool execution to prevent unexpected behavior when using `latest` toolkit versions. This ensures users explicitly specify toolkit versions when executing tools manually, while allowing flexibility through a skip flag.
10
11 This release also eliminates a lot of redundant API calls made to check connected account during tool execution, effectively increasing the performance of tool execution.
12
13 ### Key Changes
14
15 #### Python SDK (`python/`)
16 - Added `ToolVersionRequiredError` exception with detailed error messages and fix suggestions
17 - Added `dangerously_skip_version_check` parameter to `execute()` method
18 - Modified `_execute_tool()` to validate version is not `latest` unless skip flag is set
19 - Automatically passes `dangerously_skip_version_check=True` for agentic provider flows
20 - Added comprehensive test coverage (19 test methods) in `test_tool_execution.py`
21
22 #### TypeScript SDK (`ts/packages/core/`)
23 - Added `ComposioToolVersionRequiredError` error class with possible fixes
24 - Added `dangerouslySkipVersionCheck` parameter to execute flow
25 - Modified tool execution to validate version before API calls
26 - Updated execution type definitions in `tool.types.ts` and `modifiers.types.ts`
27 - Updated test files with date-based version format (`20251201_xx`)
28 - Improved tool execution by eliminating redundant API calls
29
30 ### Behavior
31 **Before:** Tools could be executed with `latest` version, risking unexpected behavior on toolkit updates
32
33 **After:** Manual execution requires specific version or explicit skip flag:
34 ```python
35 # Raises ToolVersionRequiredError
36 tools.execute("GITHUB_CREATE_ISSUE", {...})
37
38 # Works - explicit version
39 tools.execute("GITHUB_CREATE_ISSUE", {...}, version="20251201_01")
40
41 # Works - configured toolkit versions
42 tools = Tools(client, provider, toolkit_versions={"github": "20251201_01"})
43
44 # Works - with skip flag (use cautiously)
45 tools.execute("GITHUB_CREATE_ISSUE", {...}, dangerously_skip_version_check=True)
46 ```
47
48 ### Breaking Changes
49 Manual tool execution without version specification now throws an error. Users must either:
50 1. Pass explicit version parameter
51 2. Configure toolkit versions in SDK initialization
52 3. Set environment variable `COMPOSIO_TOOLKIT_VERSION_<TOOLKIT_SLUG>`
53 4. Use `dangerously_skip_version_check=True` flag