@devries-cameron20 / composio Mirror · read-only / commits / 6493616bb
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 22:00 UTC

fix: make deep copy of pydantic models when caching `Tool` objects

angrybayblade committed Jul 3, 2025 at 13:17 UTC 6493616bb5a9848b0d902f3311fed1f389f8a3e3
1 file changed +3 -1
python/composio/core/models/tools.py
+3 -1
@@ -154,7 +154,9 @@ class Tools(Resource, t.Generic[TProvider]):
154 for tool in tools_list
155 ]
156
157 - self._tool_schemas.update({tool.slug: tool for tool in tools_list})
157 + self._tool_schemas.update(
158 + {tool.slug: tool.model_copy(deep=True) for tool in tools_list}
159 + )
160 for tool in tools_list:
161 tool.input_parameters = self._file_helper.process_schema_recursively(
162 schema=tool.input_parameters,