Skip to content

Fix after_call not firing when model calls a non-existent tool - #1526

Open
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-after-call-missing-tool
Open

Fix after_call not firing when model calls a non-existent tool#1526
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-after-call-missing-tool

Conversation

@ikatyal2110

Copy link
Copy Markdown
Contributor

When a model calls a tool by a name that does not appear in the configured tool list, the sync and async executors returned an error ToolResult but skipped the after_call hook entirely, so --td produced no debug output for those failed calls. Both paths now invoke after_call with tool=None before continuing, matching the existing behaviour of before_call for unknown tools. Fixes #1151

When a tool call references a tool name that does not exist, the
sync and async executors built an error ToolResult and continued
to the next call without invoking the after_call hook. This meant
--td (tools-debug) showed no output for failed/unknown tool calls,
as reported in issue simonw#1151.
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.

No tool debug output from llm chat -T QuickJS -m qwen3:4b --td

2 participants