#[non_exhaustive]pub struct ModelProfile {
pub context_window: Option<u64>,
pub max_output_tokens: Option<u64>,
pub reasoning_efforts: Vec<String>,
pub thinking: bool,
pub vision: bool,
}Expand description
What one model supports. Every field is optional knowledge: None means
“not stated”, never “not supported”, so a partial catalog entry can still
be useful.
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.context_window: Option<u64>Total context window in tokens, when known. A host renders budget and compaction decisions from this; core never enforces it.
max_output_tokens: Option<u64>Ceiling on tokens the model will generate in one response.
reasoning_efforts: Vec<String>Reasoning-effort values this model accepts, e.g. ["low", "high"].
Empty means the model takes no effort setting at all — which is what
makes passing one an error rather than a no-op.
thinking: boolWhether the model supports an extended-thinking token budget.
vision: boolWhether the model accepts image content.
Implementations§
Source§impl ModelProfile
impl ModelProfile
Sourcepub fn new() -> ModelProfile
pub fn new() -> ModelProfile
A profile that states nothing. Build one up with the setters.
Sourcepub fn context_window(self, tokens: u64) -> ModelProfile
pub fn context_window(self, tokens: u64) -> ModelProfile
State the context window, in tokens.
Sourcepub fn max_output_tokens(self, tokens: u64) -> ModelProfile
pub fn max_output_tokens(self, tokens: u64) -> ModelProfile
State the per-response output ceiling, in tokens.
Sourcepub fn reasoning_efforts(
self,
efforts: impl IntoIterator<Item = impl Into<String>>,
) -> ModelProfile
pub fn reasoning_efforts( self, efforts: impl IntoIterator<Item = impl Into<String>>, ) -> ModelProfile
State which reasoning-effort values the model accepts.
Sourcepub fn thinking(self, supported: bool) -> ModelProfile
pub fn thinking(self, supported: bool) -> ModelProfile
State that the model supports an extended-thinking budget.
Sourcepub fn vision(self, supported: bool) -> ModelProfile
pub fn vision(self, supported: bool) -> ModelProfile
State that the model accepts images.
Trait Implementations§
Source§impl Clone for ModelProfile
impl Clone for ModelProfile
Source§fn clone(&self) -> ModelProfile
fn clone(&self) -> ModelProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more