(cost: number)
| 391 | * Format cost as currency string |
| 392 | */ |
| 393 | export function formatCost(cost: number): string { |
| 394 | if (cost === 0) return "$0.00" |
| 395 | if (cost < 0.0001) return `$${cost.toExponential(2)}` |
| 396 | if (cost < 0.01) return `$${cost.toFixed(4)}` |
| 397 | if (cost < 1) return `$${cost.toFixed(3)}` |
| 398 | return `$${cost.toFixed(2)}` |
| 399 | } |
| 400 | |
| 401 | /** |
| 402 | * Get all available models |
nothing calls this directly
no outgoing calls
no test coverage detected