Skip to content

fix(on_llm_request): 插件处理工具列表从替换改为合并#21

Open
crt106 wants to merge 1 commit intoHim666233:mainfrom
crt106:fix/preserve-builtin-tools-in-on-llm-request
Open

fix(on_llm_request): 插件处理工具列表从替换改为合并#21
crt106 wants to merge 1 commit intoHim666233:mainfrom
crt106:fix/preserve-builtin-tools-in-on-llm-request

Conversation

@crt106
Copy link

@crt106 crt106 commented Mar 14, 2026

修复 #20

…_tool

AstrBot >=4.14 injects built-in tools (cron, send_message_to_user,
computer_use, etc.) into req.func_tool inside build_main_agent, after
_plugin_tool_fix runs. The previous implementation overwrote req.func_tool
entirely with plugin_tool_set, silently dropping all framework-injected
tools.

Fix: use req.func_tool as the base and merge any missing plugin tools from
plugin_tool_set into it, so both plugin-registered and built-in tools are
preserved.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant