import { LanguageModelMiddleware } from "ai"; //#region src/utils/usage-cost-middleware.d.ts declare function extractUsageTokens(usage: any): { inputTokens: number; outputTokens: number; reasoningTokens?: number; cachedReadTokens?: number; cachedWriteTokens?: number; }; declare function normalizeModelId(modelId: string): string; declare function countCacheMarkers(prompt: readonly any[], callProviderOptions?: Record): number; /** * Count of part-level (conversation-history / BP2) cache markers only — the distinct BP2 signal. * BP1 (system + tools) is message-level and tracked via the prefix signature; this isolates the * history boundary so cross-turn cache participation can be attributed to it. */ declare function countHistoryCacheMarkers(prompt: readonly any[]): number; declare function computePrefixSignature(prompt: readonly any[], tools?: readonly any[]): string; declare const gatewayCostMiddleware: LanguageModelMiddleware; //#endregion export { computePrefixSignature, countCacheMarkers, countHistoryCacheMarkers, extractUsageTokens, gatewayCostMiddleware, normalizeModelId };