Skip to main content

create_routed_model_provider_with_options_and_resolver

Function create_routed_model_provider_with_options_and_resolver 

pub fn create_routed_model_provider_with_options_and_resolver(
    config: &Config,
    primary_name: &str,
    api_key: Option<&str>,
    api_url: Option<&str>,
    reliability: &ReliabilityConfig,
    model_routes: &[ModelRouteConfig],
    default_model: &str,
    options: &ModelProviderRuntimeOptions,
) -> Result<(Box<dyn ModelProvider>, Arc<ModelRouteResolver>), Error>
Expand description

Build the routed provider together with the exact immutable route resolver it uses. Agent turn metadata can therefore resolve the serving profile and model without maintaining a second hint table.