Skip to content

docs: clarify structured output map limitations#726

Merged
TomerAberbach merged 1 commit into
openai:nextfrom
Rohan5commit:docs/structured-outputs-map-clarification-20260425
May 4, 2026
Merged

docs: clarify structured output map limitations#726
TomerAberbach merged 1 commit into
openai:nextfrom
Rohan5commit:docs/structured-outputs-map-clarification-20260425

Conversation

@Rohan5commit
Copy link
Copy Markdown
Contributor

Summary

  • Clarifies the current Map limitation for structured outputs.
  • Adds a concrete workaround so readers know how to model arbitrary key/value data.

Related issue

Guideline alignment

  • Single-file README clarification
  • No generated files touched
  • No behavior changes

Validation

  • git diff --check

Copilot AI review requested due to automatic review settings April 25, 2026 03:22
@Rohan5commit Rohan5commit requested a review from a team as a code owner April 25, 2026 03:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation to clarify that Map fields aren’t supported when deriving JSON Schema for Structured Outputs, and suggests a practical modeling workaround for representing arbitrary key/value data.

Changes:

  • Documents that Map-typed fields result in a schema with no named "properties" for that sub-schema.
  • Adds guidance to model arbitrary key/value data as a list of entry objects with named fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TomerAberbach TomerAberbach changed the base branch from main to next May 4, 2026 19:33
@TomerAberbach TomerAberbach merged commit e1e1161 into openai:next May 4, 2026
7 of 9 checks passed
@stainless-app stainless-app Bot mentioned this pull request May 4, 2026
stainless-app Bot pushed a commit that referenced this pull request May 7, 2026
Co-authored-by: Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structured outputs Map handling has confusing error message and isn't well documented

4 participants