(bytes: number, model?: string)
| 208 | } |
| 209 | |
| 210 | export function estimateCostFromBytes(bytes: number, model?: string): number { |
| 211 | const pricingKey = model ? MODEL_MAPPING[model] || model : 'claude-haiku-4.5' |
| 212 | const pricing = |
| 213 | EFFICIENCY_CONSTANTS.PRICING[pricingKey] ?? |
| 214 | EFFICIENCY_CONSTANTS.PRICING['claude-haiku-4.5'] |
| 215 | const tokens = bytes / EFFICIENCY_CONSTANTS.BYTES_PER_TOKEN |
| 216 | return calculateCost(tokens, pricing) |
| 217 | } |
| 218 | |
| 219 | // === Formatters === |
| 220 |
no test coverage detected