Variable: deCollideToolCallIds
ts
const deCollideToolCallIds: ToolCallIdFilterFn;Defined in: src/batteries/llm/chat_common/types.ts:473
De-collides a provider-supplied tool-call id against calls already adopted in this dispatch. It prevents the concrete call_0-repeated-across-turns failure seen with grok-4.3 on Bedrock Mantle. Default absent = identity; this implementation returns the original id when no collision exists.
Remarks
#doStoreToolCall adds to turnToolCalls synchronously before its await, and adoption is a sequential loop, so each call sees every prior call — including same-response siblings. A correctly numbered parallel batch (call_0..call_3) passes through because those ids are already DISTINCT, not because the siblings are unstored. A genuine same-response duplicate is de-collided, as intended.