Parent issue
strands-agents/sdk-typescript#1104
Scope
Write integration tests validating structured output (Pydantic model → validated response):
- Basic Pydantic model as
structured_output_model
- Nested Pydantic models
- Models with constrained fields (Field validators, enums)
result.structured_output returns validated instance
- Auto-retry on validation failure
- Per-invocation schema override vs agent-level default
Context
Structured output works by converting a Pydantic model to a JSON Schema, passing it through WIT as a tool spec, and the TS SDK's StructuredOutputTool forces the model to produce conforming JSON. The result crosses back through the event stream and is validated on the Python side.
Done when
Parent issue
strands-agents/sdk-typescript#1104
Scope
Write integration tests validating structured output (Pydantic model → validated response):
structured_output_modelresult.structured_outputreturns validated instanceContext
Structured output works by converting a Pydantic model to a JSON Schema, passing it through WIT as a tool spec, and the TS SDK's
StructuredOutputToolforces the model to produce conforming JSON. The result crosses back through the event stream and is validated on the Python side.Done when
result.structured_outputis a properly typed Pydantic instance