fix: use runtime config for followup accounting

This commit is contained in:
Mariano Belinky
2026-04-08 10:17:35 +02:00
parent 013557ceda
commit 2a3e4e5c60

View File

@@ -294,7 +294,7 @@ export function createFollowupRunner(params: {
await persistRunSessionUsage({
storePath,
sessionKey,
cfg: queued.run.config,
cfg: runtimeConfig,
usage,
lastCallUsage: runResult.meta?.agentMeta?.lastCallUsage,
promptTokens,
@@ -303,10 +303,7 @@ export function createFollowupRunner(params: {
contextTokensUsed,
systemPromptReport: runResult.meta?.systemPromptReport,
cliSessionBinding: runResult.meta?.agentMeta?.cliSessionBinding,
usageIsContextSnapshot: isCliProvider(
fallbackProvider ?? run.provider,
queued.run.config,
),
usageIsContextSnapshot: isCliProvider(fallbackProvider ?? run.provider, runtimeConfig),
logLabel: "followup",
});
}