#[non_exhaustive]pub enum WireErrorKind {
Show 20 variants
Auth,
Request,
RateLimit,
InvalidRequest,
ModelNotAvailable,
ProviderNotConfigured,
ProviderNotEnabled,
CapabilityUnsupported,
ContentFiltered,
Config,
Serialization,
Http,
Stream,
Timeout,
ToolProviderUnsupported,
ToolArguments,
ToolNotFound,
ToolLoopLimitExceeded,
StructuredOutput,
Other(String),
}Expand description
The category of a WireError, mirroring Error::kind_str.
Serializes as the same snake_case string Error::kind_str returns, so the
two stay interchangeable in logs and metrics. A value this build does not
know deserializes into Other rather than failing,
which is what lets an older client keep parsing streams from a newer server.
This enum is #[non_exhaustive]: match with a catch-all arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auth
Authentication failed.
Request
The provider request failed for a reason with no more specific variant.
RateLimit
The provider throttled the request.
InvalidRequest
The request itself was invalid.
ModelNotAvailable
The requested model is unavailable.
ProviderNotConfigured
The provider has no credentials configured.
ProviderNotEnabled
The provider’s Cargo feature is disabled in the server build.
CapabilityUnsupported
The endpoint does not implement a capability the request needed.
ContentFiltered
The provider filtered the content.
Config
The SDK was misconfigured.
Serialization
A value failed to serialize or deserialize.
Http
The HTTP transport failed.
Stream
The stream itself failed partway through.
Timeout
The request timed out.
ToolProviderUnsupported
The provider does not support tool calling.
ToolArguments
Tool arguments failed schema validation.
ToolNotFound
A requested tool is not registered.
ToolLoopLimitExceeded
The tool loop exceeded its configured round limit.
StructuredOutput
Structured output failed validation.
Other(String)
A category this build does not know about.
Produced when deserializing a stream from a newer rai-sdk. Serializes
back to the original string, so a proxy can forward it untouched.
Implementations§
Trait Implementations§
Source§impl Clone for WireErrorKind
impl Clone for WireErrorKind
Source§fn clone(&self) -> WireErrorKind
fn clone(&self) -> WireErrorKind
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 WireErrorKind
impl Debug for WireErrorKind
Source§impl<'de> Deserialize<'de> for WireErrorKind
impl<'de> Deserialize<'de> for WireErrorKind
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 Display for WireErrorKind
impl Display for WireErrorKind
impl Eq for WireErrorKind
Source§impl From<&str> for WireErrorKind
impl From<&str> for WireErrorKind
Source§impl PartialEq for WireErrorKind
impl PartialEq for WireErrorKind
Source§impl Serialize for WireErrorKind
impl Serialize for WireErrorKind
impl StructuralPartialEq for WireErrorKind
Auto Trait Implementations§
impl Freeze for WireErrorKind
impl RefUnwindSafe for WireErrorKind
impl Send for WireErrorKind
impl Sync for WireErrorKind
impl Unpin for WireErrorKind
impl UnsafeUnpin for WireErrorKind
impl UnwindSafe for WireErrorKind
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.