/** * Ledger-driven tier recommendations. * * Turns the routing ledger's per-model outcome measurements into concrete * suggestions for the smart-routing tier pins: switch a pin to a measured * model that performs meaningfully better, pin a tier that has no pin yet, or * confirm the current pin is holding up. Pure functions; no I/O. */ import { type ModelOutcomeStats } from "./routing-ledger.js"; import { type ComplexityTier } from "./smart-router.js"; export interface ModelCostInfo { /** `provider/modelId` */ key: string; outputCostPerMillion: number; } export interface TierRecommendation { tier: ComplexityTier; /** Pinned key, if any. */ current?: string; /** Recommended key. */ suggested: string; /** One sentence, numbers included. */ reason: string; kind: "switch" | "pin" | "keep"; } export interface TierPins { fast?: string; balanced?: string; powerful?: string; } /** Build a `costOf` lookup from registry-derived cost info. */ export declare function createCostLookup(models: readonly ModelCostInfo[]): (key: string) => number | undefined; /** Map registry models to `ModelCostInfo` keyed by `provider/id`. */ export declare function toModelCostInfo(models: ReadonlyArray<{ provider: string; id: string; cost: { output: number; }; }>): ModelCostInfo[]; export declare function recommendTierModels(stats: ReadonlyMap, pins: TierPins, costOf: (key: string) => number | undefined, options?: { minTurns?: number; }): TierRecommendation[]; export declare function formatRecommendations(recs: readonly TierRecommendation[]): string; //# sourceMappingURL=routing-recommendations.d.ts.map