#[non_exhaustive]pub struct Compat {
pub reasoning_field: Option<String>,
pub adaptive_thinking: bool,
pub thinking_off: Option<String>,
pub mid_conversation_system: bool,
pub rejects_forced_tool_choice: bool,
pub binds_context: bool,
pub prompt_cache_options: bool,
pub chat_tools_need_reasoning_off: bool,
pub prefill: bool,
}Expand description
Wire facts the encoders read that no portable field holds. Each defaults
to false or None, which is what a model the field does not concern
has. An override file sets each one by its field name under a row’s
rig object, and a spec built in code sets it with the with_* setter
of the same name.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.reasoning_field: Option<String>The field an OpenAI Chat Completions assistant message must carry
its reasoning under, such as reasoning_content.
adaptive_thinking: boolAnthropic: an effort level goes with thinking: {"type": "adaptive"}.
thinking_off: Option<String>Anthropic: the thinking.type that turns reasoning off, where it is
not disabled.
mid_conversation_system: boolAnthropic: the model takes role: "system" inside messages.
rejects_forced_tool_choice: boolAnthropic: the model answers a forced tool_choice with an error.
binds_context: boolAnthropic: the model binds its thinking to the request’s tools and system prompt.
prompt_cache_options: boolOpenAI: the prompt cache takes prompt_cache_options, not
prompt_cache_retention.
chat_tools_need_reasoning_off: boolOpenAI: Chat Completions takes the model’s tools only while its reasoning is off.
prefill: boolThe model continues a request that ends in an assistant message (a
prefill) from where that message stops, instead of refusing it, as
Anthropic’s models before Claude 4.6 do while their reasoning is
off. Unknown is false.
Implementations§
Source§impl Compat
impl Compat
Sourcepub fn with_reasoning_field(self, field: impl Into<String>) -> Self
pub fn with_reasoning_field(self, field: impl Into<String>) -> Self
These facts with field as the Chat Completions assistant message’s
reasoning field.
Sourcepub fn with_prefill(self, on: bool) -> Self
pub fn with_prefill(self, on: bool) -> Self
These facts with prefill continuation set to on.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Compat
impl<'de> Deserialize<'de> for Compat
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 Compat
impl StructuralPartialEq for Compat
Auto Trait Implementations§
impl Freeze for Compat
impl RefUnwindSafe for Compat
impl Send for Compat
impl Sync for Compat
impl Unpin for Compat
impl UnsafeUnpin for Compat
impl UnwindSafe for Compat
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§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<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 more