-
Notifications
You must be signed in to change notification settings - Fork 4.4k
core(py): add auto_upload_download_files boolean flag to Composio()
#2334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
auto_upload_download_files boolean flag to Composio()
| # Process file uploadable schemas | ||
| for tool in router_tools: | ||
| tool.input_parameters = ( | ||
| tools_model._file_helper.process_file_uploadable_schema( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToolRouter ignores auto_upload_download_files setting from SDK
Medium Severity
The ToolRouter always calls process_file_uploadable_schema unconditionally, ignoring the auto_upload_download_files setting. When ToolRouter is initialized in sdk.py, the auto_upload_download_files parameter isn't passed to it. Inside _create_tools_fn, a new ToolsModel is created without this parameter, defaulting to True. Meanwhile, tools.py correctly gates this processing with if self._auto_upload_download_files. This causes inconsistent behavior: users setting auto_upload_download_files=False on Composio() will find that composio.tools respects the setting but composio.tool_router does not.
This PR:
auto_upload_download_files: boolto Python'sComposio()constructor.