We have a following response data model where EntityA
contains field_a
of Array type with constraints on min and max item count:
{
"$defs":{
"GenerateResponse":{
"items":{
"anyOf":[
{
"$ref":"#/$defs/EntityA"
}
]
},
"title":"GenerateResponse",
"type":"array"
},
"EntityA":{
"properties":{
"field_a":{
"items":{
"type":"string"
},
"minItems":1,
"maxItems":4,
"title":"Field A",
"type":"array"
}
},
"required":[
"field_a"
],
"title":"EntityA",
"type":"object"
}
},
"properties":{
"entities":{
"$ref":"#/$defs/GenerateResponse"
}
},
"required":[
"entities"
],
"title":"GenerateOpenAiResponse",
"type":"object"
}
However, when using gpt4o with structured output, we get ââminItemsâ is not permittedâ
and ââmaxItemsâ is not permittedâ validation error for the response model above.
Any insights when this is going to be supported and if it all?
Thanks!