feat(graph): thread the graph abort into llm nodes and tool execution

LlmNodeExecutor::execute now takes the graph's abort signal and threads
it through run -> run_with_retries -> run_chat_loop, replacing the
loop-private signal, so an in-flight model call is interrupted and every
turn starts with an abort check that bails 'llm node aborted' before any
client is created.

run_llm_function gains an optional abort signal: the synchronous tool
wait loop kills the child and returns a 'Tool call ... aborted' error
within one poll interval when it is set. The tool dispatcher passes the
session abort; the agent _instructions runner passes None.
This commit is contained in:
Dark-Alex-17 committed 2026-09-11 10:56:28 -06:00
1 parent 1ea755e864
commit cce8381962
4 files changed
+105 -8

No files matched your search

+1
View File
@@ -633,6 +633,7 @@ impl Agent {
Some(self.name().to_string()),
tool_timeout,
false,
None,
)?;
match value {
Some(v) => Ok(v),