Skip to content

Commit 419c0a0

Browse files
committed
feat: add toolsSincePrune count to nudge log output
1 parent dcd7804 commit 419c0a0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/fetch-wrapper/gemini.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export async function handleGemini(
5353
if (injectPrunableListGemini(body.contents, endInjection)) {
5454
ctx.logger.debug("fetch", "Injected prunable tools list (Gemini)", {
5555
ids: numericIds,
56-
nudge: includeNudge
56+
nudge: includeNudge,
57+
toolsSincePrune: ctx.toolTracker.toolResultCount
5758
})
5859
modified = true
5960
}

lib/fetch-wrapper/openai-chat.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export async function handleOpenAIChatAndAnthropic(
5858
if (injectPrunableList(body.messages, endInjection)) {
5959
ctx.logger.debug("fetch", "Injected prunable tools list", {
6060
ids: numericIds,
61-
nudge: includeNudge
61+
nudge: includeNudge,
62+
toolsSincePrune: ctx.toolTracker.toolResultCount
6263
})
6364
modified = true
6465
}

lib/fetch-wrapper/openai-responses.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export async function handleOpenAIResponses(
5858
if (injectPrunableListResponses(body.input, endInjection)) {
5959
ctx.logger.debug("fetch", "Injected prunable tools list (Responses API)", {
6060
ids: numericIds,
61-
nudge: includeNudge
61+
nudge: includeNudge,
62+
toolsSincePrune: ctx.toolTracker.toolResultCount
6263
})
6364
modified = true
6465
}

0 commit comments

Comments
 (0)