mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-21 15:31:46 +02:00
Merge refreshed PR #3491 request-model deduplication follow-up
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user