pub struct RuntimeModels { /* private fields */ }Expand description
The models one algorithm run may use, grouped by [Category]. Within a
category they are ordered best-first.
Delegated sub-agent work gets its own groups, reachable only through
Driver::for_subagent. Keeping them separate is what stops a sub-agent’s
capable from resolving to the parent’s, and stops the parent falling back
onto a model only its sub-agents were given.
One run’s driver clones all read the same value, so it is passed as
Arc<RuntimeModels> rather than cloned per driver.
Implementations§
Source§impl RuntimeModels
impl RuntimeModels
Sourcepub fn new(by_category: HashMap<Category, Vec<ModelId>>) -> Self
pub fn new(by_category: HashMap<Category, Vec<ModelId>>) -> Self
The models available to the algorithm itself.
Sourcepub fn with_pool(self, pool: TargetPool) -> Result<Self>
pub fn with_pool(self, pool: TargetPool) -> Result<Self>
Opt into a score line for the parent router. Subagents retain their own decisions.
Rejects pool targets absent from the parent’s Any completion group.
Sourcepub fn with_subagent(self, models: HashMap<Category, Vec<ModelId>>) -> Self
pub fn with_subagent(self, models: HashMap<Category, Vec<ModelId>>) -> Self
Adds the groups used for delegated sub-agent work.
Sourcepub fn models_for(&self, category: &Category) -> &[ModelId]
pub fn models_for(&self, category: &Category) -> &[ModelId]
The models in category, ordered best-first.
Sourcepub fn subagent_models_for(&self, category: &Category) -> &[ModelId]
pub fn subagent_models_for(&self, category: &Category) -> &[ModelId]
The models delegated sub-agent work uses for category, ordered best-first.
Trait Implementations§
Source§impl Clone for RuntimeModels
impl Clone for RuntimeModels
Source§fn clone(&self) -> RuntimeModels
fn clone(&self) -> RuntimeModels
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more