ModelSelectorTrait

Trait ModelSelectorTrait 

Source
pub trait ModelSelectorTrait: Send + Sync {
    // Required method
    fn select(
        &self,
        requirements: &AgentRequirements,
    ) -> Result<(String, String), LlmError>;
}
Expand description

Trait for model selection based on agent requirements.

This trait allows injecting provider-specific model selection logic without coupling core to concrete providers.

Concrete implementations (with provider metadata) are in converge-provider.

Required Methods§

Source

fn select( &self, requirements: &AgentRequirements, ) -> Result<(String, String), LlmError>

Selects the best model for the given requirements.

Returns (provider, model) if a suitable model is found.

§Errors

Returns error if no model satisfies the requirements.

Implementors§