Adds Version Checks for Tool Execution and Improved Execution Speed in TS SDK
Summary
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.
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.
Key Changes
Python SDK (python/)
- ✅ Added
ToolVersionRequiredErrorexception with detailed error messages and fix suggestions - ✅ Added
dangerously_skip_version_checkparameter toexecute()method - ✅ Modified
_execute_tool()to validate version is notlatestunless skip flag is set - ✅ Automatically passes
dangerously_skip_version_check=Truefor agentic provider flows - ✅ Added comprehensive test coverage (19 test methods) in
test_tool_execution.py
TypeScript SDK (ts/packages/core/)
- ✅ Added
ComposioToolVersionRequiredErrorerror class with possible fixes - ✅ Added
dangerouslySkipVersionCheckparameter to execute flow - ✅ Modified tool execution to validate version before API calls
- ✅ Updated execution type definitions in
tool.types.tsandmodifiers.types.ts - ✅ Updated test files with date-based version format (
20251201_xx) - ✅ Improved tool execution by eliminating redundant API calls
Behavior
Before: Tools could be executed with latest version, risking unexpected behavior on toolkit updates
After: Manual execution requires specific version or explicit skip flag:
Breaking Changes
⚠️ Manual tool execution without version specification now throws an error. Users must either:
- Pass explicit version parameter
- Configure toolkit versions in SDK initialization
- Set environment variable
COMPOSIO_TOOLKIT_VERSION_<TOOLKIT_SLUG> - Use
dangerously_skip_version_check=Trueflag