Skip to main content

create_resilient_model_provider_with_options

Function create_resilient_model_provider_with_options 

Source
pub fn create_resilient_model_provider_with_options(
    primary_name: &str,
    api_key: Option<&str>,
    api_url: Option<&str>,
    reliability: &ReliabilityConfig,
    options: &ModelProviderRuntimeOptions,
) -> Result<Box<dyn ModelProvider>, Error>
Expand description

Wrap the primary model_provider in a retry/backoff harness, threading auth runtime options.

Legacy entry point — no per-alias typed extras. Codex routing now happens inside OpenAIModelProviderConfig::create_provider driven by the alias’s base.requires_openai_auth flag. Production callers that have agent context should use create_resilient_model_provider_for_alias to surface family-specific config like Azure resource/deployment.