Skip to main content

find_upstream_for_model

Function find_upstream_for_model 

Source
pub fn find_upstream_for_model(
    config: &ModelRoutingConfig,
    model: &str,
) -> Option<ModelRoutingResult>
Expand description

Find the upstream for a given model name.

Checks mappings in order (first match wins). If no mapping matches, returns the default upstream if configured, otherwise None.

§Arguments

  • config - Model routing configuration
  • model - Model name to route

§Returns

Some(ModelRoutingResult) if a matching upstream was found, None otherwise.