Class ToolCallConfirmationRequiredException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.ai.model.tool.ToolCallConfirmationRequiredException
All Implemented Interfaces:
Serializable

public class ToolCallConfirmationRequiredException extends RuntimeException
Thrown by a ToolCallingManager when a tool call of the batch needs a person's confirmation before it runs (see ToolCallConfirmationPolicy) and no ToolCallDecisions were given. None of the batch's tool calls ran.

A tool-calling loop pauses on it: it returns the reply to the caller as the model gave it, listing the keys of the calls that wait for a decision under ToolCallDecisions.AWAITING_DECISION_METADATA_KEY. The caller collects the decisions and runs the batch with ToolCallingManager.executeToolCalls(org.springframework.ai.chat.prompt.Prompt, org.springframework.ai.chat.model.ChatResponse, ToolCallDecisions).

Since:
2.1.0
Author:
Christian Tzolov
See Also: