Skip to content

settleToolCalls

function settleToolCalls(provider, calls): ToolCallDelta[];

Defined in: core/src/tool-args.ts:155

Make a turn’s tool calls runnable before its finish goes out, or fail the turn.

A call with no name can’t run: nothing says which tool to dispatch. It used to pass through (the Messages reader wrote "" for both fields), and the loop failed one step later with nothing to say why. It throws overload now, a broken turn the same request usually does not repeat; cc-proxy answers it with a 502.

A call with no id still can run. It gets one from normalizeToolId, written back into calls and returned as the deltas to send, so the result has an id to quote. An id the vendor did send is never rewritten: the four wires must agree on it (invariant 10), and repeated ids are history repair’s job.

Parameter Type
provider string
calls Iterable<ToolCallIdentity>

ToolCallDelta[]