import type { CanonicalModelId, ProviderId } from "./canonical-model.js"; import { type ProviderPolicy } from "./policy.js"; import type { InferenceRequirements, RoutePlan, RouteSkip } from "./plan.js"; import type { PlannerTransport } from "./transport.js"; export interface RoutePlanRequest { readonly primaryModel: CanonicalModelId; /** A distinct fallback canonical model, or null. Equal to primary is ignored. */ readonly fallbackModel: CanonicalModelId | null; readonly requirements: InferenceRequirements; /** * Policy resolution per canonical model — typically * `resolveProviderPolicy(registry, model, boundProviders)` partially * applied by the host. Injected as a function so the planner never reads * configuration itself. */ readonly policyFor: (model: CanonicalModelId) => ProviderPolicy; /** * Composed transport registry. Map lookup by the provider ids the policy * names — registration/iteration order never determines priority * (PRD §4.3). */ readonly transports: ReadonlyMap; } export interface RoutePlanResult { readonly plan: RoutePlan; /** Configuration/capability omissions recorded while planning (PRD §7.1). */ readonly skips: readonly RouteSkip[]; } /** * Deterministically expand a canonical primary/fallback selection into an * immutable, ordered route plan (LLM Provider Routing PRD §5.1). The only * ordering inputs are the two model stages and each stage's policy provider * order. Identical `(provider, invocation model)` endpoints are de-duplicated * across the whole plan, first occurrence wins. */ export declare function buildRoutePlan(request: RoutePlanRequest): RoutePlanResult;