pub struct ModelRoster {
pub model: Option<String>,
pub provider_name: Option<String>,
pub provider_type: Option<String>,
pub fast: Option<RoleModel>,
pub background: Option<RoleModel>,
pub summarization: Option<RoleModel>,
}Expand description
Cohesive value object for a request’s primary + auxiliary model selection.
This replaces the loose model/provider field clump on the per-request param
structs. Capability-driven models (planning_model_name,
search_model_name) are intentionally not part of the roster — they are
resolved separately from Config and are not role-driven.
Fields§
§model: Option<String>Primary (main chat) model name. None defers to the config default at
the resolution site (see AgentRuntime::execute).
provider_name: Option<String>Provider routing key for the primary model. None cascades to
Config::provider at the resolution site.
provider_type: Option<String>Underlying provider type for the primary model (e.g. openai,
anthropic, copilot). Distinct from provider_name so
provider-specific behavior stays correct when the routing key is an
instance id.
fast: Option<RoleModel>Fast/cheap role. None falls back to Config::get_fast_model().
background: Option<RoleModel>Memory/background role. None falls back to
Config::get_memory_background_model().
summarization: Option<RoleModel>Summarization/compression role. None falls back to
Config::get_task_summary_model().
Implementations§
Source§impl ModelRoster
impl ModelRoster
Sourcepub fn from_areas(
model: Option<String>,
provider_name: Option<String>,
provider_type: Option<String>,
areas: GlobalAreaModels,
) -> Self
pub fn from_areas( model: Option<String>, provider_name: Option<String>, provider_type: Option<String>, areas: GlobalAreaModels, ) -> Self
Build a roster from a resolved [GlobalAreaModels] plus the primary
model selection. Centralizes the fast/background/summarization mapping
(RoleModel::from_parts(area.model_name, area.provider)) that the
execute handler and schedule manager previously hand-rolled identically.
Sourcepub fn fast_model(&self) -> Option<String>
pub fn fast_model(&self) -> Option<String>
Fast-model name override, if any.
Sourcepub fn fast_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
pub fn fast_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
Fast-model dedicated provider handle, if any.
Sourcepub fn background_model(&self) -> Option<String>
pub fn background_model(&self) -> Option<String>
Background-model name override, if any.
Sourcepub fn background_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
pub fn background_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
Background-model dedicated provider handle, if any.
Sourcepub fn summarization_model(&self) -> Option<String>
pub fn summarization_model(&self) -> Option<String>
Summarization-model name override, if any.
Sourcepub fn summarization_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
pub fn summarization_model_provider(&self) -> Option<Arc<dyn LLMProvider>>
Summarization-model dedicated provider handle, if any.
Sourcepub fn set_fast(
&mut self,
name: Option<String>,
provider: Option<Arc<dyn LLMProvider>>,
)
pub fn set_fast( &mut self, name: Option<String>, provider: Option<Arc<dyn LLMProvider>>, )
Set the fast role from the old loose pair.
Sourcepub fn set_background(
&mut self,
name: Option<String>,
provider: Option<Arc<dyn LLMProvider>>,
)
pub fn set_background( &mut self, name: Option<String>, provider: Option<Arc<dyn LLMProvider>>, )
Set the background role from the old loose pair.
Sourcepub fn set_summarization(
&mut self,
name: Option<String>,
provider: Option<Arc<dyn LLMProvider>>,
)
pub fn set_summarization( &mut self, name: Option<String>, provider: Option<Arc<dyn LLMProvider>>, )
Set the summarization role from the old loose pair.
Trait Implementations§
Source§impl Clone for ModelRoster
impl Clone for ModelRoster
Source§fn clone(&self) -> ModelRoster
fn clone(&self) -> ModelRoster
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more