(summary *TokenUsageSummary)
| 1111 | } |
| 1112 | |
| 1113 | func populateAIC(summary *TokenUsageSummary) { |
| 1114 | if summary == nil { |
| 1115 | return |
| 1116 | } |
| 1117 | |
| 1118 | total := 0.0 |
| 1119 | for model, usage := range summary.ByModel { |
| 1120 | if usage == nil { |
| 1121 | continue |
| 1122 | } |
| 1123 | aic := computeModelInferenceAIC(usage.Provider, model, usage.InputTokens, usage.OutputTokens, usage.CacheReadTokens, usage.CacheWriteTokens, usage.ReasoningTokens) |
| 1124 | usage.AIC = aic |
| 1125 | total += aic |
| 1126 | } |
| 1127 | summary.TotalAIC = total |
| 1128 | } |
no test coverage detected