pub enum ModelTurnOutcome {
Continue {
response_hook_suppressed: bool,
},
NeedsResolution(InvalidToolCallContext),
TurnRetried,
}Expand description
Result of feeding a model turn (or an invalid tool-call resolution) into the machine.
Deliberately exhaustive: a driver must handle every outcome, so adding a variant is a breaking change by design.
Variants§
Continue
The turn was accepted. Unless response_hook_suppressed is set, the
driver should run its completion-response hook now, then call
AgentRun::next_step.
response_hook_suppressed is set when invalid tool-call recovery
(repair or skip) modified the turn, matching the agent loop’s behavior
of not invoking on_completion_response for recovered turns.
Fields
NeedsResolution(InvalidToolCallContext)
The model emitted a tool call that is unknown or disallowed for this
turn. The driver must decide how to recover (typically by asking its
invalid tool-call hook) and answer via
AgentRun::resolve_invalid_tool_call.
TurnRetried
The turn was rolled back with corrective feedback appended to the
history. Call AgentRun::next_step to obtain the retry
AgentRunStep::CallModel.