(n: number)
| 119 | } |
| 120 | |
| 121 | function formatTokens(n: number): string { |
| 122 | if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`; |
| 123 | if (n >= 1_000) return `${Math.round(n / 1_000)}k`; |
| 124 | return String(n); |
| 125 | } |
| 126 | |
| 127 | export function estimateCost(input: EstimateInput): EstimateResult { |
| 128 | assertValidLevel(input.level); |
no outgoing calls
no test coverage detected