项目文件夹

文件
Simon Willison 92a9ca7cbf Async tool calls to missing tools now produce error results (#1483)
The async execute_tool_calls() silently dropped calls to tools that
were not in tools= (or had no implementation): output and exception
were assigned but no ToolResult was ever appended, so the next
provider call carried an assistant tool_call with no matching result
- which OpenAI and Anthropic reject. The sync executor already
returned an 'Error: tool ... does not exist' result.

The async path now mirrors the sync one: before_call fires (and can
CancelToolCall) even though the tool is unavailable, and an error
ToolResult is appended in call order. Also removes the now-unreachable
tool-is-None branch from the inline sync-implementation path.

This matters more since chain resume landed: a pending call whose
tool is no longer registered would otherwise never resolve.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 15:17:37 -07:00
..
2023-04-01 15:00:19 -07:00
2026-04-28 14:42:39 -07:00
2026-04-28 14:42:39 -07:00
2025-01-31 13:18:41 -08:00
2025-04-10 17:19:36 -07:00
2025-05-27 10:16:27 -07:00
2026-03-17 11:25:12 -07:00