import { type EvalsCatalog } from "./model-routing-evals.js"; import { type ResolvedTaskNeeds } from "./model-routing-needs.js"; /** What ranking needs to know about one eligible model. */ export interface CandidateModel { /** `provider/id`, as used in router selections. */ readonly model: string; readonly name: string; readonly cost: { readonly input: number; readonly output: number; }; readonly input: readonly string[]; /** `provider/id` of the base model when this entry is its derived fast route (`fastRoute` metadata). */ readonly fastRouteOf?: string; /** Explicit provider tier, used to avoid claiming measured latency for ultrafast. */ readonly fastRouteServiceTier?: "priority" | "ultrafast"; /** True when `cost` already holds the route tier's published rates rather than the base model's. */ readonly fastRoutePriced?: boolean; } export interface RankedCandidate extends CandidateModel { /** Identity shared by one model's providers and its derived fast route, which collapse onto it. */ readonly baseKey: string; readonly score: number; readonly values: ReadonlyMap; /** How each quoted value was measured, for example its effort, harness or reporter. */ readonly conditions: ReadonlyMap; readonly released?: string; readonly workStanding?: number; readonly overallStanding?: number; } /** * Rank every eligible model for the task in code. Quality is the model's * standing among every benchmarked model in the catalog on the benchmarks for * this kind of work (overall intelligence when it has none), so it does not * depend on which other models are eligible. It is weighed against price by how * demanding the task is, with a small preference for newer releases. */ export declare function rankCandidates(catalog: EvalsCatalog, candidates: readonly CandidateModel[], needs: ResolvedTaskNeeds): RankedCandidate[]; /** The best `size` candidates with at most one per base model. */ export declare function distinctTop(ranked: readonly RankedCandidate[], size: number): RankedCandidate[]; /** * One shortlisted option described with its own evidence, so the router compares * options directly: release date, price tier, image input, and results for this * kind of work and overall, with standings among catalog models measured on the same benchmark by the same source. */ export declare function describeOption(option: RankedCandidate, needs: ResolvedTaskNeeds, eligible: readonly RankedCandidate[]): string; //# sourceMappingURL=model-routing-candidates.d.ts.map