pub enum HostReaction {
DoNotRetry,
NarrowOrSkip,
RaiseBudgetOrSkip,
RetryWithBackoff,
Respawn,
DropProvider,
ReportAndCount,
}Expand description
What a host should do about a provider error. Advisory guidance attached to
each ErrorCode, so the reaction lives with the vocabulary rather than
being re-derived by every host.
Variants§
DoNotRetry
The request itself was wrong. Retrying it unchanged will fail again.
NarrowOrSkip
The provider does not serve exactly what was asked for. Adjust the
request — narrow the query’s kinds, or downgrade
representation_preferences to full — or stop querying this provider
for it.
RaiseBudgetOrSkip
No useful frame fits the stated budget. Raise max_tokens or skip.
RetryWithBackoff
Transient. Retry with backoff.
Respawn
The provider is tearing down. Re-spawn it or drop it from the fan-out.
DropProvider
The provider is permanently unusable — e.g. a handshake version family
that shares no major with the host (SPEC.md §H3). Drop it from the
fan-out; retrying cannot help, and it is not a health blip to count and
keep. Distinct from DoNotRetry (there the request
was wrong) and Respawn (there a retry could succeed).
ReportAndCount
A provider fault. Report it and count it against the provider’s health.
Trait Implementations§
Source§impl Clone for HostReaction
impl Clone for HostReaction
Source§fn clone(&self) -> HostReaction
fn clone(&self) -> HostReaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more