import { type InvokeCostBreakdown, type InvokeTokenUsage } from "./cost/computeInvokeCost.js"; import { buildInvokePricingRecord, type InvokePricingRecord, type InvokeUsageTokens } from "./cost/invokePricingRecord.js"; import { type InvokePricingModelInput } from "./cost/resolveInvokePricing.js"; import type { AIProvider, PreferOpenRouterInput, ProfileCatalogLane, RegistrySourceMode } from "./types.js"; export type InvokeCostStatus = "priced" | "unpriced"; export type InvokeCostSource = "catalog" | "estimate-fallback"; export interface CalculateInvokeCostInput { /** Resolved profile key or concrete OpenRouter / vendor slug. */ model: InvokePricingModelInput; tokens: InvokeTokenUsage; routing?: "openrouter" | "direct"; profileChoice?: { profile: string; choice: string; }; } export interface CalculateInvokeCostOptions { bundledOnly?: boolean; includeBreakdown?: boolean; catalogLane?: ProfileCatalogLane; preferOpenRouter?: PreferOpenRouterInput; source?: RegistrySourceMode; refresh?: boolean; } export interface CalculateInvokeCostResult { costUsd: number; costStatus: InvokeCostStatus; source: InvokeCostSource; isAuthoritative: boolean; unknownModel?: boolean; provider?: AIProvider; modelId?: string; routing?: "openrouter" | "direct"; profileChoice?: { profile: string; choice: string; }; breakdown?: InvokeCostBreakdown; } /** * Calculate invoke-time USD cost from catalog pricing and token usage. * * Profile/choice inputs require `options.catalogLane`. Unknown models return * `costStatus: "unpriced"` with `unknownModel: true` (no silent guess). */ export declare function calculateInvokeCost(input: CalculateInvokeCostInput, options?: CalculateInvokeCostOptions): Promise; /** Sync bundled variant of {@link calculateInvokeCost} (no network). */ export declare function calculateInvokeCostSync(input: CalculateInvokeCostInput, options?: Omit): CalculateInvokeCostResult; /** * Activix-compatible entry: snake_case usage keys on the record. * Parity with ai-tools `CostCalculator.calculateFromRecord`. */ export declare function calculateInvokeCostFromRecord(record: InvokePricingRecord, options?: CalculateInvokeCostOptions): Promise; /** Sync bundled variant of {@link calculateInvokeCostFromRecord}. */ export declare function calculateInvokeCostFromRecordSync(record: InvokePricingRecord, options?: Omit): CalculateInvokeCostResult; export { buildInvokePricingRecord, type InvokePricingRecord, type InvokeUsageTokens, }; //# sourceMappingURL=calculateInvokeCost.d.ts.map