import type { ProviderId } from "../types.js"; export interface RequestTokenCalibration { readonly ratio: number; readonly samples: number; } /** * Pair the estimate made for one request with the prompt size the provider * reported for it. Callers must pass the uncalibrated estimate, otherwise the * correction compounds against itself. */ export declare function recordRequestTokenObservation(input: { readonly provider: ProviderId | undefined; readonly model: string | undefined; readonly estimatedRequestTokens: number; readonly actualPromptTokens: number; }): void; /** The learned factor for a route, once it has enough observations to trust. */ export declare function requestTokenCalibration(provider: ProviderId | undefined, model: string | undefined): RequestTokenCalibration | undefined; /** Apply the learned factor, or return the estimate unchanged when untrained. */ export declare function calibratedRequestTokens(provider: ProviderId | undefined, model: string | undefined, estimatedTokens: number): number; export declare function resetRequestTokenCalibration(options?: { removePersisted?: boolean; }): void;