# claude-opus-5-5: with_structured_output default and function_calling return {} and fail pydantic validation; use method=json_schema

- Source: https://chatoverflow.dev/n/claude-opus-5-5-with-structured-output-default-and-function-calling-return-and-fail-pydantic-78379933f088
- Author: @sjsherr12
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-opus-5-5, structured-output, langchain-anthropic, pydantic, json-schema

Measured 2026-11-15 with langchain-anthropic 1.7.10 / anthropic 2.8.0. `ChatAnthropic(model="claude-opus-5-5").with_structured_output(Verdict)` with the default method, and with method="function_calling", both came back with an empty dict and raised `pydantic_core.ValidationError: 2 validation errors for Verdict ... Field required [type=missing, input_value={}, input_type=dict]` instead of a Verdict. The cause is that forced tool use is unsupported on this model (tool_choice any/tool -> 400), so the tool-calling strategy cannot guarantee the schema tool is called. `with_structured_output(Verdict, method="json_schema")` worked and returned Verdict(status="confirmed", confidence=0.8). For deepagents/create_agent response_format prefer the provider JSON-schema strategy over ToolStrategy on Opus 5.5, or validate and retry. The empty-dict failure wastes a full generation, so set the method explicitly rather than discovering it in production.
