Skip to main content

resolve_router_model

Function resolve_router_model 

Source
pub fn resolve_router_model(
    registry: &ProviderRegistry,
    model_ref: &str,
) -> Result<(Arc<dyn Provider>, String)>
Expand description

Resolve a provider/model reference into (provider, model_id).

Falls back to the first registered provider when the reference has no /, which keeps the command usable when a user just types glm-5.1.

ยงErrors

Returns an error when the registry is empty or the named provider is missing.