#[non_exhaustive]pub enum ResponseWarning {
SynthesizedCallIds,
UnknownFinishReason {
reported: String,
},
UsageUnreported,
FeatureDropped {
feature: String,
},
Reconstructed,
}Expand description
Something an adapter wants the caller to know without failing the call.
Warnings are the honest channel for “I did the job, but not exactly the way you asked”: they belong in a replay record, and a stage that cares may refuse a response that carries one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SynthesizedCallIds
The provider did not return usable tool-call ids and the adapter
synthesized them. The profile must declare
preserves_call_ids = false.
UnknownFinishReason
The provider reported a finish reason this crate does not model.
UsageUnreported
The provider did not report token usage.
FeatureDropped
The adapter dropped a request feature the provider cannot express (a stop sequence beyond the vendor limit, a cache hint, a tool-choice mode). Never used for structured output: an adapter that cannot enforce a schema declares a weaker capability instead of warning about it.
Reconstructed
The answer was rebuilt from a stream rather than received whole.
Trait Implementations§
Source§impl Clone for ResponseWarning
impl Clone for ResponseWarning
Source§impl Debug for ResponseWarning
impl Debug for ResponseWarning
Source§impl<'de> Deserialize<'de> for ResponseWarning
impl<'de> Deserialize<'de> for ResponseWarning
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>,
impl Eq for ResponseWarning
Source§impl Hash for ResponseWarning
impl Hash for ResponseWarning
Source§impl PartialEq for ResponseWarning
impl PartialEq for ResponseWarning
Source§impl Serialize for ResponseWarning
impl Serialize for ResponseWarning
impl StructuralPartialEq for ResponseWarning
Auto Trait Implementations§
impl Freeze for ResponseWarning
impl RefUnwindSafe for ResponseWarning
impl Send for ResponseWarning
impl Sync for ResponseWarning
impl Unpin for ResponseWarning
impl UnsafeUnpin for ResponseWarning
impl UnwindSafe for ResponseWarning
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.