count_unemitted_tool_calls(
buffers: Iterable[ToolCallBuffer],
) -> UnemittedToolCalls| Name | Type | Description |
|---|---|---|
buffers* | Iterable[ToolCallBuffer] | The in-progress tool-call buffers remaining at stream end. |
Classify buffered tool calls that never emitted a tool.use.
Both surfaces log the same end-of-stream diagnostic for tool calls still in
their buffer map when the stream ends: those whose args never parsed, and
those whose args parsed but whose tool_id stayed None (so tool.use was
gated out). Sharing the classification here keeps the two diagnostics from
drifting; each surface still emits its own log lines. parse_args is safe to
re-run (idempotent bar its one-shot warned latch).