simonw--llm
ee2ffbec23
Tool functions (sync or async, including Toolbox methods) that declare a parameter named llm_tool_call are now passed the llm.ToolCall object for the current invocation. The parameter is reserved: it is excluded from the input schema exposed to the model and is only injected when declared explicitly - a **kwargs catch-all does not receive it. This lets tool implementations key external state against the unique tool_call_id, e.g. for human-in-the-loop approval flows that need to resume a specific tool call after the answer arrives. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>