pub struct ResolvedProfiles {
pub profiles: Vec<ProviderProfile>,
}Expand description
A parsed and validated FoundationProfiles ready for role resolution.
Fields§
§profiles: Vec<ProviderProfile>The profile list, in declaration order. pick_for_role returns the
first profile whose role membership matches and whose declared
capabilities satisfy the configured mechanism.
Implementations§
Source§impl ResolvedProfiles
impl ResolvedProfiles
Sourcepub fn pick_for_role(
&self,
role: ProfileRole,
mechanism: ExtractMechanism,
) -> Result<&ProviderProfile, FoundationError>
pub fn pick_for_role( &self, role: ProfileRole, mechanism: ExtractMechanism, ) -> Result<&ProviderProfile, FoundationError>
Pick the first profile that lists role and whose declared capabilities
satisfy mechanism. Capability rejection is reported as
FoundationError::CapabilityUnsatisfied so the caller can show the
user why that profile is unsuitable and continue the resolution
ladder.
Cross-host surface: tests in tests/foundation_profiles.rs
exercise the role-resolution ladder; the oxibrain-cli binary
uses oxibrain_cli::cmd::llm::resolve_provider (which iterates
profiles internally) and never calls this method directly.
Sourcepub fn iter(&self) -> Iter<'_, ProviderProfile> ⓘ
pub fn iter(&self) -> Iter<'_, ProviderProfile> ⓘ
Profiles in declaration order.
Trait Implementations§
Source§impl Clone for ResolvedProfiles
impl Clone for ResolvedProfiles
Source§fn clone(&self) -> ResolvedProfiles
fn clone(&self) -> ResolvedProfiles
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more