Interface ModelRouteResult

The result of a model routing decision. It specifies the selected provider, model, and provides reasoning for the choice.

interface ModelRouteResult {
    provider: IProvider;
    modelId: string;
    modelInfo: ModelInfo;
    reasoning: string;
    confidence: number;
    estimatedCostTier?: string;
    metadata?: Record<string, any>;
}

Properties

provider: IProvider

The selected AI model provider instance.

modelId: string

The ID of the selected model on the chosen provider.

modelInfo: ModelInfo

Detailed information about the selected model.

reasoning: string

A human-readable explanation of why this model and provider were chosen.

confidence: number

A confidence score (0.0 to 1.0) indicating the router's certainty in this selection. Higher values mean higher confidence.

estimatedCostTier?: string

An optional classification of the estimated cost tier for this model (e.g., "low", "medium", "high").

metadata?: Record<string, any>

Any additional metadata related to the routing decision (e.g., matched rule ID, performance estimates).