/** * Pricing module. * * - Bundled rates live in pricing.json (loaded once on first use). * - Consumers can override via update_pricing() or set_pricing_overrides() at runtime. * - compute_cost() takes a UsageInfo and returns it enriched with cost_usd + pricing_applied. * * Pricing key convention: "/" (lowercase provider). */ import type { PricingEntry, PricingTable, UsageInfo } from "./types.js"; import type { HazoConnect } from "../hazo_connect/types.js"; import type { Logger } from "../llm_api/types.js"; /** Idempotent. Reads the bundled pricing.json into the in-memory table. */ export declare function load_pricing(): void; /** Test helper — clears the in-memory cache so the next load_pricing() re-reads. */ export declare function reset_pricing_for_test(): void; /** Look up the pricing entry for "/". Returns null if absent. */ export declare function get_pricing(key: string): PricingEntry | null; /** Override one entry at runtime. */ export declare function update_pricing(key: string, entry: PricingEntry): void; /** Merge multiple overrides (used by initialize_llm_api({ pricing_overrides })). */ export declare function set_pricing_overrides(overrides: PricingTable): void; /** * Compute cost for a usage record using the current pricing table. * * Returns a NEW UsageInfo with cost_usd + pricing_applied populated when possible, * or with both undefined when the model is unpriced. */ export declare function compute_cost(usage: UsageInfo): UsageInfo; export interface RecomputeOpts { connect: HazoConnect; logger: Logger; /** ISO date — only recompute rows created at or after this timestamp. */ from?: string; /** ISO date — only recompute rows created at or before this timestamp. */ to?: string; /** Restrict to specific model names. */ models?: string[]; /** When true, report changes but do not write. Default false. */ dry_run?: boolean; } export interface RecomputeResult { total_inspected: number; updated: number; /** Populated in dry_run mode — number of rows that would have been updated. */ would_update: number; } export declare function recompute_costs(opts: RecomputeOpts): Promise; //# sourceMappingURL=pricing.d.ts.map