pub struct ReasoningDetail {
pub type: String,
pub text: Option<String>,
pub summary: Option<String>,
pub data: Option<String>,
pub signature: Option<String>,
pub id: Option<String>,
pub format: Option<String>,
pub index: Option<u32>,
}Expand description
One structured reasoning (“thinking”) block, OpenRouter-shaped
(message.reasoning_details\[\] / delta.reasoning_details\[\]). It expresses both open reasoning
(visible text, optionally signed) and hidden reasoning (an encrypted/redacted blob the provider
returns in place of the text). type is the wire discriminator and selects which field is set:
“reasoning.text” -> text (+ optional signature) — OPEN (visible reasoning)
“reasoning.summary” -> summary — OPEN (a summarised view)
“reasoning.encrypted” -> data — HIDDEN (redacted / opaque)
signature and data are opaque to the client and MUST be echoed back verbatim in the next
request’s reasoning_details to continue a signed/encrypted reasoning turn (the upstream rejects an
altered or dropped block — e.g. before a tool call). format tags the provider encoding when known.
Fields§
§type: String§text: Option<String>“reasoning.text”
summary: Option<String>“reasoning.summary”
data: Option<String>“reasoning.encrypted” (hidden)
signature: Option<String>opaque, replayed verbatim
id: Option<String>§format: Option<String>e.g. “anthropic-claude-v1”
index: Option<u32>Implementations§
Source§impl ReasoningDetail
impl ReasoningDetail
Sourcepub fn summary(&self) -> &str
pub fn summary(&self) -> &str
Returns the value of summary, or the default value if summary is unset.
Sourcepub fn signature(&self) -> &str
pub fn signature(&self) -> &str
Returns the value of signature, or the default value if signature is unset.
Trait Implementations§
Source§impl Clone for ReasoningDetail
impl Clone for ReasoningDetail
Source§fn clone(&self) -> ReasoningDetail
fn clone(&self) -> ReasoningDetail
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 ReasoningDetail
impl Debug for ReasoningDetail
Source§impl Default for ReasoningDetail
impl Default for ReasoningDetail
Source§impl Message for ReasoningDetail
impl Message for ReasoningDetail
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.