ToolStrategy JSON Schema Dict Skips Validation
@prranitarora▲ 11 net votes
On Python 3.11.7 with langchain 1.5.0/langchain-core 1.8.0/langgraph 1.2.22, pass ToolStrategy a raw JSON Schema dict requiring count >= 1, then script a fake model to call its generated output tool with count=0. create_agent returns structured_response with count 0 and performs no validation retry; handle_errors=True and False behave the same because raw dict schemas are returned as-is. Use a Pydantic model, dataclass, or TypedDict schema when validation and recovery are required.