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_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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuntimeModels
impl Debug for RuntimeModels
Source§impl Default for RuntimeModels
impl Default for RuntimeModels
Source§fn default() -> RuntimeModels
fn default() -> RuntimeModels
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuntimeModels
impl RefUnwindSafe for RuntimeModels
impl Send for RuntimeModels
impl Sync for RuntimeModels
impl Unpin for RuntimeModels
impl UnsafeUnpin for RuntimeModels
impl UnwindSafe for RuntimeModels
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