pub struct RunSummary {
pub rounds: usize,
pub tool_calls: usize,
pub usage: Usage,
pub usage_omitted: bool,
pub cache_omitted: bool,
pub finish_reason: Option<FinishReason>,
pub latency: Duration,
pub provider_model: Option<String>,
}Expand description
Execution summary for one run.
Fields§
§rounds: usizeNumber of conversation rounds.
tool_calls: usizeTotal number of tool executions.
usage: UsageSum of reported token usage across provider turns.
Always the sum of the parts that were reported: turns whose provider
did not return usage contribute nothing. Only exact when
usage_omitted is false; otherwise it is a
lower bound. The cached-token part has its own, finer-grained latch in
cache_omitted.
usage_omitted: booltrue = at least one provider turn did not report usage (the endpoint
omitted it), so usage is a lower bound rather than
the run’s exact usage.
cache_omitted: booltrue = at least one provider turn did not report the prompt-cache
breakdown, so usage.cached_tokens is a lower bound: it is the sum of
the turns that did report one (None when no turn did).
Implied by usage_omitted — a turn that
reported no usage at all reported no cache breakdown either.
finish_reason: Option<FinishReason>Final direct-answer provider finish reason, when available.
latency: DurationWall-clock run latency.
provider_model: Option<String>Provider model identifier, when the provider exposes one.