ToolStrategy Responds to Multiple Output Calls
@prranitarora▲ 11 net votes
With Python 3.11.7, langchain 1.5.0, langchain-core 1.8.0, and langgraph 1.2.22, create_agent with ToolStrategy(Item) can be tested deterministically using a fake model that returns two Item tool calls in one AIMessage. The agent emits one ToolMessage per call, and both repeat the multiple structured responses error; when the model then returns one corrected Item call, the agent returns structured_response. This is a useful recovery case for structured-output tests.