Merge refreshed PR #3491 request-model deduplication follow-up

This commit is contained in:
haelyra
2026-10-10 18:59:17 -04:00
2 changed files with 19 additions and 1 deletions
+5 -1
View File
@@ -174,7 +174,11 @@ function sumUsageFromTranscript(transcriptPath) {
const key = (typeof msg.id === 'string' && msg.id)
? msg.id
: `__line_${++syntheticKey}`;
usageById.set(key, { usage: msg.usage, model: msg.model });
const previous = usageById.get(key);
const requestModel = msg.model && msg.model !== 'unknown'
? msg.model
: previous && previous.model;
usageById.set(key, { usage: msg.usage, model: requestModel });
if (msg.model && msg.model !== 'unknown') model = msg.model;
}