pub struct RunReport<S> {
pub session_id: String,
pub model: String,
pub provider: String,
pub final_message: Option<String>,
pub outcome: RunOutcome,
pub failure: Option<RunFailure>,
pub stopped_by: Option<Bound>,
pub usage: RunUsage,
pub sink: S,
}Expand description
What a completed run produced, alongside the sink it wrote to.
Fields§
§session_id: String§model: String§provider: String§final_message: Option<String>The assistant’s final message, absent when the run failed — and absent
on a typed turn, where the answer is
OutputReport::value rather than prose.
outcome: RunOutcome§failure: Option<RunFailure>Original typed runtime failure, before RunOutcome display/wire
projection. None on success and on Basis-owned output-shape mismatch.
Also None on a failed typed turn (PreparedRun::output), where the
same error is the OutputFailure::error the report arrives beside: a
RunFailure is not Clone and cannot be in both places, and the error
is the half a caller reaching for ? gets. The validated path
(PreparedRun::output_parts_validated_with_options) returns Ok, so
there this field is the only home and keeps it (ADR-0024 §4).
stopped_by: Option<Bound>Which bound ended the run, when one did rather than the work.
Neither field implies the other: a bounded run usually failed for want
of a final message, but see Bound::TokenBudget, which a run that
answered can carry.
usage: RunUsageWhat the run reported spending. Present whether it succeeded or not: a turn that failed on its fourth round still spent the first three.
sink: S