mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 21:48:27 +00:00
fix(agents): stabilize overflow compaction retries and session context accounting (openclaw#14102) thanks @vpesh
Verified:
- CI checks for commit 86a7ecb45e
- Rebase conflict resolution for compatibility with latest main
Co-authored-by: vpesh <9496634+vpesh@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
da55d70fb0
commit
957b883082
@@ -25,6 +25,7 @@ export async function persistSessionUsageUpdate(params: {
|
||||
modelUsed?: string;
|
||||
providerUsed?: string;
|
||||
contextTokensUsed?: number;
|
||||
promptTokens?: number;
|
||||
systemPromptReport?: SessionSystemPromptReport;
|
||||
cliSessionId?: string;
|
||||
logLabel?: string;
|
||||
@@ -56,6 +57,7 @@ export async function persistSessionUsageUpdate(params: {
|
||||
deriveSessionTotalTokens({
|
||||
usage: usageForContext,
|
||||
contextTokens: resolvedContextTokens,
|
||||
promptTokens: params.promptTokens,
|
||||
}) ?? input,
|
||||
modelProvider: params.providerUsed ?? entry.modelProvider,
|
||||
model: params.modelUsed ?? entry.model,
|
||||
|
||||
Reference in New Issue
Block a user