ALL_REQUIRED

OpenAI Strict Mode (Default): All parameters are marked as required.

In strict mode, all parameters must be present in the required array. Optional/nullable parameters are represented using union types with null: ["string", "null"].

Example:

fun writeLog(level: String, exception: String? = null)

Generates:

{
"required": ["level", "exception"],
"properties": {
"level": { "type": "string" },
"exception": { "type": ["string", "null"] }
}
}

This ensures the model always provides all fields, even if they're null.

Properties

Link copied to clipboard
Link copied to clipboard