pub enum ModelsDevInterleaved {
Enabled(bool),
Field {
field: Option<String>,
},
}Expand description
Interleaved reasoning metadata from a Models.dev provider row.
Live Models.dev uses two shapes for this field, verified against
https://models.dev/catalog.json on 2026-07-07:
- a bare boolean (
interleaved: true) on ~32 provider rows, signalling the provider supports interleaved reasoning without naming a wire field, and - an object (
interleaved: { "field": "reasoning_content" }) on the majority of rows, naming the wire field that carries reasoning deltas.
Modeling only the object shape made serde_json::from_str::<ModelsDevCatalog>
reject every boolean row before the live catalog could be used at all
(#4185). This untagged enum accepts both shapes while preserving the field
hint whenever the object form supplies one.
Variants§
Enabled(bool)
Boolean form: interleaved: true / interleaved: false.
Field
Object form: interleaved: { "field": "reasoning_content" }.
field stays optional so an empty or partial object still parses, and
unknown sibling keys are ignored rather than rejected.
Implementations§
Source§impl ModelsDevInterleaved
impl ModelsDevInterleaved
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether interleaved reasoning is enabled for this row.
The boolean form reports its literal value. The object form is treated as enabled because upstream only emits the object (naming a wire field) for interleaved-capable rows.
Trait Implementations§
Source§impl Clone for ModelsDevInterleaved
impl Clone for ModelsDevInterleaved
Source§fn clone(&self) -> ModelsDevInterleaved
fn clone(&self) -> ModelsDevInterleaved
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 ModelsDevInterleaved
impl Debug for ModelsDevInterleaved
Source§impl<'de> Deserialize<'de> for ModelsDevInterleaved
impl<'de> Deserialize<'de> for ModelsDevInterleaved
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 ModelsDevInterleaved
Source§impl PartialEq for ModelsDevInterleaved
impl PartialEq for ModelsDevInterleaved
Source§impl Serialize for ModelsDevInterleaved
impl Serialize for ModelsDevInterleaved
impl StructuralPartialEq for ModelsDevInterleaved
Auto Trait Implementations§
impl Freeze for ModelsDevInterleaved
impl RefUnwindSafe for ModelsDevInterleaved
impl Send for ModelsDevInterleaved
impl Sync for ModelsDevInterleaved
impl Unpin for ModelsDevInterleaved
impl UnsafeUnpin for ModelsDevInterleaved
impl UnwindSafe for ModelsDevInterleaved
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
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.