/** * pricing.ts — Centralized pricing, context windows, thresholds, and cost calculation * * Single source of truth for: * - Model pricing (USD per 1M tokens) * - Known context windows * - Context notification thresholds * - Default model fallback * - Tool token estimates * * Prices are in USD per million tokens. */ export interface ModelPricing { input: number; output: number; cacheRead: number; cacheCreate: number; } export declare const PRICING: Record; export declare const DEFAULT_PRICING: ModelPricing; export declare const DEFAULT_MODEL = "claude-sonnet-4-6"; /** * Known context windows by model ID. * To add a new model: add an entry with the model ID as key and context size as value. * Fallback for unknown models: 200,000 tokens. */ export declare const KNOWN_CONTEXT_WINDOWS: Record; /** * Get context window for a model. * Priority: config override → KNOWN_CONTEXT_WINDOWS → 200K fallback. */ export declare function getContextWindow(model: string): number; /** Context usage % thresholds for notifications: [50%, 75%, 90%] */ export declare const CONTEXT_THRESHOLDS: readonly [50, 75, 90]; /** Average tokens per tool call type — used when real tokens are unavailable. */ export declare const TOOL_TOKEN_ESTIMATE: Record; export declare function calcCost(model: string, usage: { input_tokens: number; output_tokens: number; cache_read_input_tokens: number; cache_creation_input_tokens: number; }): number; export declare function estimateTokensFromToolCounts(toolCounts: Record): number; export declare function estimateCost(inputTokens: number, outputTokens: number, model: string): number; export interface ModelPrice { input: number; output: number; } export declare function findPricing(model: string): ModelPrice | null;