diff --git a/src/Chain/StructuredOutput/SchemaFactory.php b/src/Chain/StructuredOutput/SchemaFactory.php index 57e2c156..1e21cb20 100644 --- a/src/Chain/StructuredOutput/SchemaFactory.php +++ b/src/Chain/StructuredOutput/SchemaFactory.php @@ -66,11 +66,7 @@ public function buildSchema(string $className): array // Add property schema to main schema $schema['properties'][$propertyName] = $propertySchema; - - // If the property does not allow null, mark it as required - if (!$type->isNullable()) { - $schema['required'][] = $propertyName; - } + $schema['required'][] = $propertyName; } return $schema;