import type { NexusAIConfig } from '../types/config.js'; import type { CostEstimate } from '../types/planning.js'; import type { CacheTtl } from '../types/providers.js'; /** * Budget enforcement lives in `optimizer/budget.ts`, which carries no registry dependency, and is * re-exported here so every existing import of this module keeps resolving. */ export { CostBudgetError, DEFAULT_CURRENCY, assertWithinCostBudget, formatCost } from './cost-budget.js'; /** Input for `estimateCost()`. */ export interface CostEstimateInput { /** The model, or an alias. */ model: string; /** Input tokens billed at the standard rate. */ inputTokens: number; /** Output tokens. Defaults to 0. */ outputTokens?: number; /** Tokens the provider served from its prompt cache, billed at the cached-read rate. */ cachedReadTokens?: number; /** Tokens the provider wrote into its prompt cache, billed at the cache-write rate. */ cachedWriteTokens?: number; /** Cache lifetime the request asked for; long-lived writes cost more on some providers. */ cacheTtl?: CacheTtl; /** Application registry entries and prices. */ config?: Pick; } /** * Prices a request from the model registry, with cached reads and writes on their own lines. * Unknown models cost 0. */ export declare function estimateCost(input: CostEstimateInput): CostEstimate;