#[non_exhaustive]pub struct ModelInfo {
pub name: String,
pub tier: ModelTier,
pub context_window: usize,
pub supports_tools: bool,
pub supports_vision: bool,
pub supports_structured: bool,
}Expand description
Information about the LLM model being used by a provider.
Returned by Provider::model_info and used by the runtime and
steering system to adapt behavior to the specific model.
This struct is #[non_exhaustive] — new capability fields may be added
in future releases without breaking changes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringModel name (e.g., "gpt-4o", "claude-sonnet-3-5").
tier: ModelTierModel capability tier for steering auto-configuration.
context_window: usizeMaximum context window size in tokens.
supports_tools: boolWhether the model supports tool/function calling.
supports_vision: boolWhether the model supports image/vision input.
supports_structured: boolWhether the model supports structured JSON output mode.
Implementations§
Source§impl ModelInfo
impl ModelInfo
Sourcepub fn new(
name: impl Into<String>,
tier: ModelTier,
context_window: usize,
supports_tools: bool,
supports_vision: bool,
supports_structured: bool,
) -> ModelInfo
pub fn new( name: impl Into<String>, tier: ModelTier, context_window: usize, supports_tools: bool, supports_vision: bool, supports_structured: bool, ) -> ModelInfo
Create a new ModelInfo.
Use this constructor when building ModelInfo outside of the
traitclaw-core crate, since the struct is #[non_exhaustive].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnsafeUnpin for ModelInfo
impl UnwindSafe for ModelInfo
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
Mutably borrows from an owned value. Read more