pub struct Registry { /* private fields */ }Implementations§
Source§impl Registry
impl Registry
pub fn load(data_dir: impl AsRef<Path>) -> Result<Self, ConfigError>
Sourcepub fn catalog(&self) -> Vec<ProviderInfo>
pub fn catalog(&self) -> Vec<ProviderInfo>
Returns the validated provider/model metadata without exposing credentials.
Sourcepub fn contains_model(&self, model_name: &str) -> bool
pub fn contains_model(&self, model_name: &str) -> bool
Returns whether a provider/model pair is declared in the loaded configuration.
This check does not read credentials or construct a provider client.
Sourcepub fn contains_compatible_model(&self, required: &[ModelCapability]) -> bool
pub fn contains_compatible_model(&self, required: &[ModelCapability]) -> bool
Returns whether one configured model provides every requested capability.
Provider names are traversed in BTreeMap order and models in their TOML
declaration order, so the first compatible model is deterministic. This
metadata-only query does not read credentials or contact providers.
Sourcepub fn compatible_models(&self, required: &[ModelCapability]) -> Vec<String>
pub fn compatible_models(&self, required: &[ModelCapability]) -> Vec<String>
Returns every configured model that provides all requested capabilities.
Provider names are traversed in BTreeMap order and models in their TOML
declaration order. The result is therefore deterministic and provider-qualified.
This metadata-only query does not read credentials or contact providers.
Sourcepub fn first_compatible_model(
&self,
required: &[ModelCapability],
) -> Option<String>
pub fn first_compatible_model( &self, required: &[ModelCapability], ) -> Option<String>
Finds the first configured model that provides every requested capability.
This is a convenience wrapper around deterministic candidate enumeration.