Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pydantic_ai_slim/pydantic_ai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,9 @@ def _customize_tool_def(transformer: type[JsonSchemaTransformer], t: ToolDefinit


def _customize_output_object(transformer: type[JsonSchemaTransformer], o: OutputObjectDefinition):
schema_transformer = transformer(o.json_schema, strict=True)
orig_schema = o.json_schema
schema_transformer = transformer(orig_schema, strict=True)
son_schema = schema_transformer.walk()
return replace(o, json_schema=son_schema)
if son_schema is orig_schema:
return o
return type(o)(**{**o.__dict__, "json_schema": son_schema})
Loading