pub enum AssistantGenerateError {
CredentialUnavailable {
provider: String,
reason: CredentialFailure,
message: String,
},
WorkspaceRequired {
provider: String,
message: String,
},
Transient {
status: Option<u16>,
message: String,
},
Other(String),
}Expand description
The typed failure of one ASSISTANT turn’s generation.
A separate type from TurnGenerationError on purpose. The coder’s enum
drives an unattended build’s retry-versus-terminal policy and is pinned by
four fixtures; the assistant needs something else entirely — the small set of
failures a chat turn can END on with a remedy a person can act on. Widening
the coder’s enum to serve both would have changed coder behaviour and its
fixtures to ship a chat feature, which is the wrong trade in both
directions.
Everything outside those cases keeps the string seam the assistant has
always had, so this enum stays deliberately small and its From stays
deliberately non-exhaustive.
Variants§
No usable credential for this provider, and why — branch on reason,
never on the text.
WorkspaceRequired
The credential works; the account behind it has no workspace yet.
Transient
A retryable remote failure whose provider-level retry budget was exhausted. Kept typed so a long assistant run does not flatten the reason into prose at the terminal receipt boundary.
Other(String)
Every other inference failure, with its operator-facing text unchanged.
Trait Implementations§
Source§impl Clone for AssistantGenerateError
impl Clone for AssistantGenerateError
Source§impl Debug for AssistantGenerateError
impl Debug for AssistantGenerateError
Source§impl Display for AssistantGenerateError
impl Display for AssistantGenerateError
impl Eq for AssistantGenerateError
Source§impl From<InferenceError> for AssistantGenerateError
impl From<InferenceError> for AssistantGenerateError
Source§fn from(error: InferenceError) -> Self
fn from(error: InferenceError) -> Self
Source§impl PartialEq for AssistantGenerateError
impl PartialEq for AssistantGenerateError
impl StructuralPartialEq for AssistantGenerateError
Auto Trait Implementations§
impl Freeze for AssistantGenerateError
impl RefUnwindSafe for AssistantGenerateError
impl Send for AssistantGenerateError
impl Sync for AssistantGenerateError
impl Unpin for AssistantGenerateError
impl UnsafeUnpin for AssistantGenerateError
impl UnwindSafe for AssistantGenerateError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more