I’m building an API response schema where a few fields are optional, but I want the model to follow the schema reliably rather than return slightly different JSON on each request.
With strict structured outputs, is it better to represent an absent value as null, or design the schema so the field can be omitted? I’m also curious how people manage schema changes when older clients still expect the previous response shape.
If you’ve shipped this in production, what approach has been least brittle?
Can you answer this question?
Write Answer0 Answers