#[non_exhaustive]pub enum RunEvent<'a> {
#[non_exhaustive] ModelRequestReady {
request: &'a ModelRequest,
},
#[non_exhaustive] ModelDelta {
invocation_id: &'a InvocationId,
delta: &'a StreamDelta,
},
#[non_exhaustive] ModelOutput {
invocation_id: &'a InvocationId,
output: &'a ModelOutput,
},
#[non_exhaustive] BlocksCommitted {
invocation_id: &'a InvocationId,
blocks: &'a [ContextBlock],
},
#[non_exhaustive] ToolBatchReady {
invocation_id: &'a InvocationId,
batch: &'a ToolBatch,
},
#[non_exhaustive] ToolBatchReturned {
invocation_id: &'a InvocationId,
batch: &'a ToolBatch,
result: Result<(), &'a ToolProcessingError>,
},
}Expand description
Borrowed execution observations. Callbacks must return promptly.
No event history is retained by the runner. ModelDelta excludes Done
and Error; a committed notification describes only the actual append.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]ModelRequestReady
A complete logical request, immediately before gateway entry.
Fields
This variant is marked as non-exhaustive
request: &'a ModelRequestThe request to be sent.
#[non_exhaustive]ModelDelta
A nonterminal streaming observation.
Fields
This variant is marked as non-exhaustive
invocation_id: &'a InvocationIdThe logical invocation.
delta: &'a StreamDeltaText, reasoning, tool-call or usage observation.
#[non_exhaustive]ModelOutput
A complete model output, before material conversion.
Fields
This variant is marked as non-exhaustive
invocation_id: &'a InvocationIdThe logical invocation.
output: &'a ModelOutputThe accepted complete output.
#[non_exhaustive]BlocksCommitted
An atomic append succeeded, including an empty append.
Fields
This variant is marked as non-exhaustive
invocation_id: &'a InvocationIdThe logical invocation.
blocks: &'a [ContextBlock]Actual appended blocks borrowed from the context.
#[non_exhaustive]ToolBatchReady
Newly committed declarations are about to enter tool processing.
Fields
This variant is marked as non-exhaustive
invocation_id: &'a InvocationIdThe logical invocation.
#[non_exhaustive]ToolBatchReturned
Tool processing actually returned; results are not yet committed.
Fields
This variant is marked as non-exhaustive
invocation_id: &'a InvocationIdThe logical invocation.
result: Result<(), &'a ToolProcessingError>The module’s return status, independent of subsequent commit.