pub struct ProviderAttempt {
pub attempt: AttemptNumber,
pub request_id: RequestId,
pub purpose: ModelPurpose,
pub stage: FallbackStage,
pub model: ModelRef,
pub outcome: AttemptOutcome,
pub class: Option<RetryClass>,
pub latency: Duration,
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub temperature: Option<f32>,
pub finish_reasons: Vec<String>,
}Expand description
One recorded model call (spec §20.7: “record every provider attempt”).
Eq is deliberately absent: the record carries the requested temperature,
and a float has no total equality.
Fields§
§attempt: AttemptNumber1-based position within the whole stage, across candidates.
request_id: RequestIdThe stable id sent on every attempt of the logical call.
purpose: ModelPurposeWhy the call was made.
stage: FallbackStageWhere in the turn it happened.
model: ModelRefWhich profile was called.
outcome: AttemptOutcomeHow it ended.
class: Option<RetryClass>How the failure was classified, when it failed.
latency: DurationWall-clock duration of the attempt.
input_tokens: Option<u64>Tokens reported, when the attempt succeeded and the provider reported.
output_tokens: Option<u64>Tokens generated, when reported.
temperature: Option<f32>Sampling temperature the request asked for, when it set one.
Recorded as sent, so an audit reads the value that produced the answer rather than a default filled in later.
finish_reasons: Vec<String>Finish reasons the provider reported, verbatim.
Not normalized: providers spell them differently, and the difference is often exactly what the audit is being read for.
Implementations§
Source§impl ProviderAttempt
impl ProviderAttempt
Sourcepub fn to_core_record(&self) -> ProviderAttemptRecord
pub fn to_core_record(&self) -> ProviderAttemptRecord
Converts into the record the core replay log stores (I20).