Skip to content

Commit e0c505a

Browse files
committed
fix: exclude batch tools from unknown metadata count in notification
1 parent 998a8d9 commit e0c505a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/janitor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export class Janitor {
109109
toolCallIds.push(normalizedId)
110110

111111
const cachedData = this.toolParametersCache.get(part.callID) || this.toolParametersCache.get(normalizedId)
112-
// Session messages store input in part.state.input, not part.parameters
113112
const parameters = cachedData?.parameters ?? part.state?.input ?? part.parameters
114113

115114
toolMetadata.set(normalizedId, {
@@ -670,6 +669,8 @@ export class Janitor {
670669
const missingTools = llmPrunedIds.filter(id => {
671670
const normalizedId = id.toLowerCase()
672671
const metadata = toolMetadata.get(normalizedId)
672+
// batch tools are intentionally excluded from the summary, so don't count them as missing
673+
if (metadata?.tool === 'batch') return false
673674
return !metadata || !foundToolNames.has(metadata.tool)
674675
})
675676

0 commit comments

Comments
 (0)