import type { PricingCatalogue } from './pricing.js'; import type { CostBreakdown, SavingsReport, UsageProfile } from './types.js'; /** * Cost of a single call. * * `batchDiscount` defaults to Anthropic's 50% rather than being read from the * model, because this function takes prices rather than a model. Callers that * have the model — which is all of them inside this package — pass its own, * and a provider with no batch API passes 1. */ export declare function costOfCall(inputTokens: number, outputTokens: number, inputPerMTok: number, outputPerMTok: number, batch: boolean, batchDiscount?: number): CostBreakdown; /** * Compares cost before and after optimising. * * Important: output tokens are held constant. A shorter prompt often produces * somewhat shorter answers, but that depends on the task and cannot be * promised, so the saving reported here comes exclusively from input tokens. */ export declare function computeSavings(tokensBefore: number, tokensAfter: number, usage: UsageProfile, on?: Date, pricing?: PricingCatalogue): SavingsReport; /** * Formats a USD amount with precision suited to its magnitude. * Currency formatting stays in `en-US` on purpose: these are US dollar prices * from a US price list, and showing them the same way everywhere avoids * confusion when a report is shared across locales. */ export declare function formatUsd(value: number): string; /** * Formats a USD amount that can legitimately be negative, with an explicit * sign. * * `formatUsd` renders a negative as `$-30.80`, which reads as a typo. In a * comparison every cost line can go either way and the sign carries the whole * meaning, so it goes in front of the currency where a reader expects it. */ export declare function formatSignedUsd(value: number): string; //# sourceMappingURL=savings.d.ts.map