---
title: "How should OpenAI strict structured outputs handle optional fields?"  
description: "How should OpenAI strict structured outputs handle optional fields?"  
author: "Gabriela Gómez"  
published: 2026-10-15  
updated: 2026-10-15  
canonical: https://www.mindstick.com/forum/162393/how-should-openai-strict-structured-outputs-handle-optional-fields  
category: "Structured Outputs"  
tags: ["OpenAI API", "JSON schema", "API Design"]  
reading_time: 1 minute  

---

# How should OpenAI strict structured outputs handle optional fields?

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?


---

Original Source: https://www.mindstick.com/forum/162393/how-should-openai-strict-structured-outputs-handle-optional-fields

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
