ai.internal._flush_orphaned_calls

(internal) Close every tool call still awaiting a result, in request order, and reset the pending list. `out` and `pending` are mutated in place. The repair is a FAILED result rather than a successful empty one: the model must be able to tell that the call did not run.

Reference version

Signature

function ai.internal._flush_orphaned_calls(out: ai.events.Event[], pending: string[]) -> void

(internal) Close every tool call still awaiting a result, in request order, and reset the pending list. out and pending are mutated in place. The repair is a FAILED result rather than a successful empty one: the model must be able to tell that the call did not run.

Source:<builtin>/ai/ns_internal/wire.bamlbytes 45844812