import type { PricingCatalogue } from './pricing.js'; import type { ModelPricing } from './types.js'; /** * Local price corrections, so a price change does not require a library upgrade. * * This is the honest answer to "pricing data separated from the release cycle". * A separate `@trazum/pricing` package would not have achieved it — you would * still need to install something to get current numbers. A JSON file in your own * repository does, and it keeps the two properties that matter: **the core still * makes no network call**, and it still has no dependencies. * * The bundled catalogue remains the default, so Trazum is correct out of the box * and an overlay is only needed once a published price moves. * * Validation is as strict as the config parser's, for the same reason: a typo'd * model id in an overlay would silently price against the bundled number, and a * budget decision made on a price nobody applied is the failure this whole file * exists to prevent. */ export declare const PRICING_OVERLAY_KEYS: readonly ['lastReviewed', 'models']; export declare const PRICING_MODEL_KEYS: readonly ['displayName', 'inputPerMTok', 'outputPerMTok', 'contextWindow', 'cacheMinTokens', 'tier', 'capability', 'caching', 'notes', 'promo', 'multipliers']; /** Largest overlay this will read — a price list, not a dataset. */ export declare const MAX_PRICING_BYTES: number; export interface PricingOverlay { /** * When these prices were checked, as `YYYY-MM-DD`. Required: an overlay whose * age is unknown is worse than the bundled catalogue, whose age is printed on * every report. */ lastReviewed: string; /** Per-model corrections, keyed by model id. */ models: Record>>; } export declare class PricingOverlayError extends Error { readonly source: string; constructor(message: string, source: string); } /** Validates an overlay document. Every failure throws, with the source named. */ export declare function parsePricingOverlay(raw: string, source?: string): PricingOverlay; /** * A new catalogue with the overlay applied. Neither argument is modified. * * **A model the bundled catalogue does not have must be complete.** Overriding * one field of a known model is the common case and needs no more than that * field; inventing a model needs every field, because a half-defined model would * price at zero somewhere and report a saving that does not exist. * * `lastReviewed` becomes the *overlay's* date, and the report shows it — a * catalogue is only as current as its most recently touched half, and claiming * the bundled date over corrected prices would be a lie about provenance. */ export declare function applyPricingOverlay(base: PricingCatalogue, overlay: PricingOverlay, source?: string): PricingCatalogue; /** Convenience: the bundled catalogue with an overlay document applied. */ export declare function catalogueFromOverlay(raw: string, source?: string): PricingCatalogue; //# sourceMappingURL=pricing-overlay.d.ts.map