pub struct ModelAlias {
pub harness: Option<String>,
pub description: Option<String>,
pub prompting: Option<String>,
pub note: Option<String>,
pub default_effort: Option<EffortRequest>,
pub autocompact: Option<u32>,
pub autocompact_pct: Option<u8>,
pub spec: ModelSpec,
}Fields§
§harness: Option<String>§description: Option<String>§prompting: Option<String>§note: Option<String>§default_effort: Option<EffortRequest>§autocompact: Option<u32>§autocompact_pct: Option<u8>§spec: ModelSpecImplementations§
Source§impl ModelAlias
impl ModelAlias
pub fn pinned_model_id(&self) -> Option<&str>
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
The text fields as shown: an empty one is a layer clearing the text below it, and reads as none. Layers keep the empty string so it can clear.
pub fn prompting(&self) -> Option<&str>
pub fn note(&self) -> Option<&str>
Sourcepub fn over(&self, lower: &ModelAlias) -> ModelAlias
pub fn over(&self, lower: &ModelAlias) -> ModelAlias
This entry as a higher layer over lower, field by field. The routing fields (model,
match, exclude, provider, harness) move as one group: an entry that sets any of
them drops all of lower’s. The rest inherit when unset. An empty description, note
or prompting clears the lower one (see the accessors).
Source§impl ModelAlias
impl ModelAlias
Sourcepub fn resolve(&self, rows: &[CachedModel]) -> Option<String>
pub fn resolve(&self, rows: &[CachedModel]) -> Option<String>
The id the alias resolves to over rows: a pinned model as written, else the best row
an auto alias selects. None when an auto alias selects nothing.
Sourcepub fn candidates(&self, rows: &[CachedModel]) -> Vec<String>
pub fn candidates(&self, rows: &[CachedModel]) -> Vec<String>
Every id the alias accepts, in resolve’s order: a pinned model first, then each row
match, exclude and provider select, best first. A pinned alias with no match
accepts its model alone.
Sourcepub fn selected<'a>(&self, rows: &'a [CachedModel]) -> Vec<&'a CachedModel>
pub fn selected<'a>(&self, rows: &'a [CachedModel]) -> Vec<&'a CachedModel>
The rows match, exclude and provider select; a pinned model’s provider is inferred
from its id when the alias names none.