/** * ModelPricingRegistry * * O(1) lookup for model pricing across all supported providers. * Replaces the flat PRICING objects with a unified registry that * supports multi-provider pricing with cache token rates. */ /** * Pricing entry for a single model */ export interface ModelPricingEntry { provider: string; model: string; /** USD per 1M input tokens */ inputPer1M: number; /** USD per 1M output tokens */ outputPer1M: number; /** USD per 1M cached read tokens (optional) */ cacheReadPer1M?: number; /** USD per 1M cache write tokens (optional) */ cacheWritePer1M?: number; /** How the cost is sourced */ costSource: 'bundled' | 'local'; } interface TokenCounts { input_tokens: number; output_tokens: number; cached_tokens?: number; cache_write_tokens?: number; } /** * Singleton registry for model pricing data. * Loads pricing from bundled-pricing.json on first access. */ export declare class ModelPricingRegistry { private static instance; private entries; private providers; private localProviders; private familyPatterns; private constructor(); static getInstance(): ModelPricingRegistry; /** * Get pricing for a model by its ID. * Supports exact match, family patterns (opus/sonnet/haiku), * and local model detection (ollama/). */ get(modelId: string): ModelPricingEntry | null; /** * Calculate cost in USD for a model and token counts */ calculateCost(modelId: string, tokens: TokenCounts): number; /** * List all known provider identifiers */ listProviders(): string[]; /** * List all known model IDs */ listModels(): string[]; private loadBundledPricing; } export {}; //# sourceMappingURL=model-pricing-registry.d.ts.map