[Feature] Allow LLM-controlled timeout for Python execution tools
Description / 描述
Currently, local Python execution effectively uses a hardcoded 30-second timeout and does not allow configuration or LLM control. Following maintainer @Soulter's guidance, we should expose a timeout parameter in the Python tools (like ExecuteShellTool) so the LLM can set a per-call window, while still enforcing the global tool limit via tool_call_timeout. To solve this issue, I have already write a PR.
目前本地 Python 执行的超时实际上被固定为 30 秒,既不能在配置文件中修改,也不能由 LLM 控制。遵照维护者 @Soulter 的建议,应当像 ExecuteShellTool 一样为 Python 工具增加 timeout 参数,让 LLM 按调用动态控制,同时仍由全局 tool_call_timeout 作为上限。为了解决这个问题,我已经写了一个PR。
Use Case / 使用场景
Some Python tasks need a longer or shorter execution window than the default, and the LLM should be able to choose an appropriate timeout per call. This change enables flexible timeouts while ensuring all tools are still constrained by the global limit. 部分 Python 任务需要更长或更短的执行时间,LLM 应能按每次调用选择合适的超时。本变更在保证全局上限不变的前提下,提供了更灵活的超时控制。
Willing to Submit PR? / 是否愿意提交PR?
- [x] Yes, I am willing to submit a PR. / 是的,我愿意提交 PR。
Code of Conduct
- [x] I have read and agree to abide by the project's Code of Conduct. /