pub fn build_session_model_provider(
config: &Config,
model_provider_ref: &str,
model_override: Option<&str>,
) -> Result<(Box<dyn ModelProvider>, String, String), Error>Expand description
Build a fresh ModelProvider box for a dotted <type>.<alias> reference,
resolving the model from the override (when supplied) or the configured
entry. Mirrors the model_provider-construction path in Agent::from_config
so a live session switch produces the same wiring a fresh agent would.
Returns the built box plus the resolved (model_provider_name, model_name)
for attribution.