Patch Changes
-
157bf7b: ### Added
- Version validation for manual tool execution: Tools now require explicit toolkit version specification when executing manually to prevent unexpected behavior from
latestversion changes - New
dangerously_skip_version_checkparameter (Python) /dangerouslySkipVersionCheck(TypeScript): Optional flag to bypass version validation (use with caution) ToolVersionRequiredErrorexception (Python): Raised when attempting to execute tools withlatestversion without skip flag, includes helpful error messages with 4 possible fixesComposioToolVersionRequiredErrorerror (TypeScript): Parallel implementation for TypeScript SDK with detailed error context and resolution suggestions- Comprehensive test coverage: Added 19 new test methods in Python covering all tool execution scenarios including version resolution, error handling, modifiers, and environment variables
Changed
- Tool execution behavior: Manual execution via
tools.execute()now validates toolkit versions before API calls - Agentic provider flows: Automatically set
dangerously_skip_version_check=Trueinternally to maintain backward compatibility for framework integrations - Instance-level version resolution: Both
execute()and_execute_tool()methods now consistently resolve versions from instance-leveltoolkit_versionsconfiguration - Modifier support: Added
dangerously_skip_version_checkto modifier parameter types for complete flow coverage - Test version format: Updated all test files to use production date-based version format (
20251201_XX) instead of semantic versioning
Fixed
- Consistent version handling: Removed
toolkit_versionsparameter from_execute_tool()in favor of instance-level configuration, ensuring consistent version resolution across the SDK - Code formatting: Applied ruff formatting to all modified Python files
- Array parsing to ZodSchema: Fixes in json-schema-to-zod to parse array without properties and with properties
Migration Guide
When manually executing tools, you must now specify toolkit versions:
Option 1: Pass explicit version parameter
tools.execute("GITHUB_CREATE_ISSUE", arguments={...}, version="20251201_01" )
Option 2: Configure at SDK initialization
tools = Tools(client, provider, toolkit_versions={"github": "20251201_01"} )
Option 3: Use environment variables
export COMPOSIO_TOOLKIT_VERSION_GITHUB=20251201_01Option 4: Skip validation (not recommended)
tools.execute("GITHUB_CREATE_ISSUE", arguments={...}, dangerously_skip_version_check=True )
Developer Notes
- Agentic framework integrations (LangChain, CrewAI, etc.) are not affected as they automatically use the skip flag
- The
latestversion can still be used with the skip flag, but specific versions are strongly recommended - Error messages include all available resolution options for better developer experience
- Version validation for manual tool execution: Tools now require explicit toolkit version specification when executing manually to prevent unexpected behavior from
-
Updated dependencies [157bf7b]
- @composio/core@0.2.0