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(python): cast result to ToolExecutionResponse for mypy overload resolution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dhawal Upadhyay committed
Mar 20, 2026 at 14:07 UTC
d2264c73360ff6033d09aca0f7140f12fe8f5041
1 file changed
+3
-1
python/composio/core/models/tool_router_session.py
+3
-1
@@ -190,13 +190,15 @@ class ToolRouterSession(t.Generic[TTool, TToolCollection]):
190
191
# Apply after_execute modifiers
192
if modifiers is not None:
193
+ from composio.core.models.tools import ToolExecutionResponse
194
+
195
type_after: t.Literal["after_execute"] = "after_execute"
196
result = apply_modifier_by_type(
197
modifiers=modifiers,
198
toolkit="composio",
199
tool=slug,
200
type=type_after,
199
- response=result,
201
+ response=t.cast(ToolExecutionResponse, result),
202
)
203
204
return result