/** * The single Model constructor. Resolution runs through the compat engine * (`compat/resolve`): identity classification, cascade-rule axes, host * detection, and spec overrides materialize exactly once per spec. * * Request handlers read fields — they never detect, parse ids, or allocate * compat per request. */ import { type Api, type Model, type ModelCost, type ModelSpec } from "./types.js"; /** * Applies reviewed catalog-data value corrections (`cost-patch`, * `cache-read-at-input-rate`, `cache-write-rate`, `limits-patch`, * `long-context-cost`, `context-window-floor`, `input-modalities`) onto an * upstream-sourced spec. Applied by * `buildModel` to every upstream-sourced spec; user-authored overrides are * recomposed after building by the override applicators, so explicit user * limits and pricing still win. */ export declare function applyCatalogCorrections(model: Pick, "cost" | "contextWindow" | "maxTokens" | "input">, catalog: Record): void; /** * Build a discovered model using the backend's catalog-selected request API. * The credential-bearing provider id remains unchanged while `providerType` * persists the backend policy identity across cache and config round trips. */ export declare function buildDiscoveredModel(spec: ModelSpec, providerType: string): Model; /** * The first instant after `now` at which {@link buildModel} could select a * different dated price card for a spec carrying `cost`: the next * `effectiveFrom` of the spec's own rate schedule or of any dated card in the * compiled rules. A build of an unchanged spec made at or after `now` is * identical to a fresh one until then. `Infinity` when no change is pending. */ export declare function nextBuildPriceChange(cost: ModelCost, now: number): number; /** * Build one model from an authored spec. Bundled models are prebuilt by the * generator and decoded by `models.ts`, so this only runs for discovered, * custom, and override specs. */ export declare function buildModel(spec: ModelSpec): Model;