#[non_exhaustive]pub struct TurnModelRetryScheduledParams {
pub session_id: String,
pub view_cursor: String,
pub source_range: SourceRange,
pub turn_id: String,
pub attempt: u32,
pub next_attempt: u32,
pub max_attempts: u32,
pub retry_delay_ms: u64,
pub system: Option<String>,
pub error_kind: Option<String>,
pub http_status: Option<u16>,
}Expand description
turn/modelRetryScheduled params: a durable model-stream retry-scheduled
fact folded — the provider backoff behind one model attempt is observable
BEFORE the turn terminates, so a streaming client can render “system words ·
retrying in Ss · attempt N/M” instead of dead air. Non-terminal: it never
resolves a turn-wait. The sibling turn/retryScheduled shape at the model
layer: same member names and semantics (attempt/nextAttempt/maxAttempts/
retryDelayMs/system/errorKind/httpStatus), minus reason — the row’s words
derive from errorKind through the shared gate-off mapping, and the
recorded machine message is not user text. The delay is the recorded
scheduled backoff, never an absolute fire time — clients derive any
countdown locally. sourceRange cites the session stream’s mirror of the
task-lifecycle record.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: StringThe owning session.
view_cursor: StringOpaque, strictly monotonic view cursor.
source_range: SourceRangeThe durable record this event folded from (the session stream’s
mirror of the scheduled model task status; first == last).
turn_id: StringThe running turn whose model attempt is being retried.
attempt: u32The failed model attempt (producer-normalized, >= 1).
next_attempt: u32The scheduled model attempt (producer contract: attempt < nextAttempt <= maxAttempts; not a schema constraint).
max_attempts: u32The model-retry chain bound.
retry_delay_ms: u64The scheduled backoff delay in milliseconds, verbatim from the durable fact.
system: Option<String>The failing model attempt’s provider system, verbatim — e.g. "meta".
Always present from this producer (the durable system is a required
String); optional on the wire so a future omission folds absent
instead of failing the frame.
error_kind: Option<String>The failing model attempt’s durable kind, verbatim — a plain string: the durable vocabulary is open-ended.
http_status: Option<u16>The failing model attempt’s HTTP status.