Gemini structured output guide

Gemini structured output is not a full JSON Schema engine either.

Google's Gemini docs explicitly describe a subset model. That means schema portability fails in subtle ways when teams assume one provider-safe JSON Schema will behave identically everywhere.

gemini structured output propertyOrderinggemini subset json schema structured outputgemini response_json_schema propertyOrdering

What breaks

  • Gemini structured output supports only a subset of JSON Schema.
  • Gemini 2.0 requires an explicit `propertyOrdering` list for preferred structure.
  • Unsupported schema properties can be ignored, which makes failures hard to notice.

What Schema Gateway fixes

  • Add `propertyOrdering` automatically where it matters.
  • Warn on schema keywords likely to be ignored.
  • Generate a provider-specific variant instead of forcing one schema to fit every runtime.

Official references