mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 07:17:40 +00:00
Co-authored-by: Josh Lehman <josh@martian.engineering>
This commit is contained in:
committed by
GitHub
parent
5d37b204c0
commit
990413534a
@@ -496,11 +496,13 @@ export const usageHandlers: GatewayRequestHandlers = {
|
||||
};
|
||||
|
||||
for (const merged of limitedEntries) {
|
||||
const agentId = parseAgentSessionKey(merged.key)?.agentId;
|
||||
const usage = await loadSessionCostSummary({
|
||||
sessionId: merged.sessionId,
|
||||
sessionEntry: merged.storeEntry,
|
||||
sessionFile: merged.sessionFile,
|
||||
config,
|
||||
agentId,
|
||||
startMs,
|
||||
endMs,
|
||||
});
|
||||
@@ -519,7 +521,6 @@ export const usageHandlers: GatewayRequestHandlers = {
|
||||
aggregateTotals.missingCostEntries += usage.missingCostEntries;
|
||||
}
|
||||
|
||||
const agentId = parseAgentSessionKey(merged.key)?.agentId;
|
||||
const channel = merged.storeEntry?.channel ?? merged.storeEntry?.origin?.provider;
|
||||
const chatType = merged.storeEntry?.chatType ?? merged.storeEntry?.origin?.chatType;
|
||||
|
||||
@@ -796,6 +797,7 @@ export const usageHandlers: GatewayRequestHandlers = {
|
||||
sessionEntry: entry,
|
||||
sessionFile,
|
||||
config,
|
||||
agentId,
|
||||
maxPoints: 200,
|
||||
});
|
||||
|
||||
@@ -849,6 +851,7 @@ export const usageHandlers: GatewayRequestHandlers = {
|
||||
sessionEntry: entry,
|
||||
sessionFile,
|
||||
config,
|
||||
agentId,
|
||||
limit,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user