Function create_model_provider_from_ref
pub fn create_model_provider_from_ref(
config: &Config,
name: &str,
) -> Result<Box<dyn ModelProvider>, Error>Expand description
Build a bare (non-resilient) provider named by name - a bare family
("llamacpp"), a dotted alias ("llamacpp.text_model"), or a custom:<url>
ref - resolving its alias-specific runtime options from config: the
vision capability override, the endpoint URI, and per-alias credentials
from [providers.models.<family>.<alias>].
Unlike the legacy create_model_provider(name, None) (which passes
config = None and ModelProviderRuntimeOptions::default(), so it cannot see
any per-alias config), this honors the alias’s vision override and typed
config while returning an un-wrapped provider - the shape the dedicated
vision route needs so its configured [multimodal] vision_model_provider
respects a per-alias vision = true/false.