pub enum StreamErrorKind {
Transient,
ProviderRateLimited,
ZeroOutputTransport,
Fatal,
Empty,
Aborted,
ContextOverflow,
}Expand description
Coarse classification of a stream error.
ContextOverflow is split out from Fatal so the loop can apply
recovery (re-run with a smaller context) instead of terminating.
Without this split, providers that surface a prompt_too_long /
context_length_exceeded error look identical to permanent
failures (auth, schema, model id) and the loop has no signal to
distinguish “trim and retry” from “give up”.
Variants§
Transient
ProviderRateLimited
The selected model/provider is temporarily rate-limited. This remains retryable at the transport boundary, but surfaces as a distinct terminal kind if every retry fails.
ZeroOutputTransport
Transport failed before the provider produced any actionable assistant turn. Hidden reasoning/details, usage, or an unusable burst of partial tool-call deltas may have arrived, but the loop still has no runnable next step, so this is safer to replay than a generic transient stream error.
Fatal
Empty
Aborted
ContextOverflow
Provider rejected the request because the assembled context
exceeds the model’s window. Distinct from Fatal so a future
recovery layer (Phase 2 in the compaction roadmap) can compact
more aggressively and retry rather than ending the run.
Trait Implementations§
Source§impl Clone for StreamErrorKind
impl Clone for StreamErrorKind
Source§fn clone(&self) -> StreamErrorKind
fn clone(&self) -> StreamErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamErrorKind
impl Debug for StreamErrorKind
Source§impl<'de> Deserialize<'de> for StreamErrorKind
impl<'de> Deserialize<'de> for StreamErrorKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StreamErrorKind
impl PartialEq for StreamErrorKind
Source§fn eq(&self, other: &StreamErrorKind) -> bool
fn eq(&self, other: &StreamErrorKind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StreamErrorKind
impl Serialize for StreamErrorKind
impl Copy for StreamErrorKind
impl Eq for StreamErrorKind
impl StructuralPartialEq for StreamErrorKind
Auto Trait Implementations§
impl Freeze for StreamErrorKind
impl RefUnwindSafe for StreamErrorKind
impl Send for StreamErrorKind
impl Sync for StreamErrorKind
impl Unpin for StreamErrorKind
impl UnsafeUnpin for StreamErrorKind
impl UnwindSafe for StreamErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.