Skip to main content
Every structured output provider supports a different subset of JSON Schema. This page shows where they diverge so you can pick the right one for your schema. The table only includes features where at least one provider differs. Basic types, items, and $defs / $ref are supported by all four.

String constraints

FeaturedottxtOpenAIAnthropicGemini
minLength / maxLength
pattern (regex)
format

Number constraints

FeaturedottxtOpenAIAnthropicGemini
minimum / maximum
exclusiveMinimum / exclusiveMaximum
multipleOf

Array constraints

FeaturedottxtOpenAIAnthropicGemini
prefixItems (tuples)
minItems / maxItems
uniqueItems

Multiple choices

FeaturedottxtOpenAIAnthropicGemini
enum

Object constraints

FeaturedottxtOpenAIAnthropicGemini
Optional fields
additionalProperties (as schema)
propertyNames
patternProperties
Arbitrary JSON
minProperties / maxProperties

Composition

FeaturedottxtOpenAIAnthropicGemini
anyOf
allOf
oneOf
not

Conditionals

FeaturedottxtOpenAIAnthropicGemini
if / then / else
dependentRequired
dependentSchemas

Schema reuse and recursion

FeaturedottxtOpenAIAnthropicGemini
Recursive schemas

Schema limits

LimitdottxtOpenAIAnthropicGemini
Nesting depthNone10 levelsNone documentedNone documented
Total propertiesNone5000None documentedNone documented
Enum valuesNone1000None documentedNone documented
Optional parametersNoneN/A24 per requestNone documented
Union type parametersNoneN/A16 per requestNone documented

Handling of unsupported features

ProviderBehavior
dottxtRejects the schema with an error specifying the unsupported construct
OpenAIWith strict: true, unsupported schemas return an API error
AnthropicSDK strips unsupported constraints, adds them as text in field descriptions, validates response client-side
GeminiSilently ignores unsupported properties

Sources

Next steps