pub fn provider_for(slug: &str) -> Arc<dyn Provider> ⓘExpand description
Select the provider implementation for a model slug.
Why: The loop must stay backend-agnostic; this factory is the only place that
knows how to map a slug to a backend, so adding a backend touches one site.
What: Returns BedrockProvider for slugs beginning with bedrock/, and
the default OpenRouterProvider (carrying the slug for its
supports_native_tools decision) for everything else.
Test: adapter::tests::provider_for_routes_*.