Skip to main content

EarlyCalls

Type Alias EarlyCalls 

Source
pub type EarlyCalls<'a> = &'a mut dyn FnMut(&ToolCall);
Expand description

A tool call handed over the moment its block is complete, before the call it belongs to has settled.

Separate from Increments because a caller acts on it: it may start a read-only tool while the model is still generating. What arrives here is not history either. The ledger records tool calls from ModelReturn after the call settles; when the call fails, a caller discards whatever it derived from these. What a caller may start, and in which order it records the results, is fixed by crates/runtime/spec/Turn/Speculation.lean.