Skip to main content

create_model_provider

Function create_model_provider 

Source
pub fn create_model_provider(
    name: &str,
    api_key: Option<&str>,
) -> Result<Box<dyn ModelProvider>>
Expand description

Factory: create the right model_provider from config (without custom URL).

Legacy entry point — no per-alias typed extras visible. Calls the _for_alias variant with default per-family config; suitable for tests and programmatic callers using compat families that don’t read from the typed alias config struct. Production callers with agent context should use create_model_provider_for_alias.