fix(questionnaire): add additionalProperties false for OpenAI strict mode#2792
Merged
fix(questionnaire): add additionalProperties false for OpenAI strict mode#2792
Conversation
…mode The gpt-5-mini parser was failing with "additionalProperties is required to be supplied and to be false" because OpenAI's Responses API enforces strict structured outputs, which requires additionalProperties: false on every object schema and every property listed in required. Also fix the same latent bug in content-extractor's shared schema, which would break if any of its callers swapped to a strict-mode OpenAI model. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
claudfuen
pushed a commit
that referenced
this pull request
May 7, 2026
# [3.46.0](v3.45.1...v3.46.0) (2026-05-07) ### Bug Fixes * **questionnaire:** add additionalProperties false for OpenAI strict mode ([#2792](#2792)) ([ea226b0](ea226b0)) ### Features * allow adding custom requirements to existing frameworks ([6b96503](6b96503)) * **frameworks:** add framework updates banner to overview page ([#2790](#2790)) ([47bd6d8](47bd6d8))
Contributor
|
🎉 This PR is included in version 3.46.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Invalid schema for response_format 'response': 'additionalProperties' is required to be supplied and to be false. Thetry/catchinparseChunkQuestionsAndAnswersswallowed the error and returned[]for every chunk.PARSING_MODEL = 'gpt-5-mini'routes through OpenAI's Responses API, which enforces strict structured outputs. Strict mode requiresadditionalProperties: falseon every object schema (root + nested) and every property listed inrequired.additionalProperties: falseto the root and nested objects, and add'answer'torequired(it was already nullable viaanyOf: [string, null]).content-extractor.ts's sharedquestionExtractionSchema. Today it's only used with Anthropic / Groq /gpt-4o-mini, but a model swap would silently break it.Audit
Checked every
generateObject/jsonSchemacall acrossapps/apiandapps/app— 13 files. Only the two patched files were affected. All other callers either use Anthropic, gateway-routed Gemini,output: 'no-schema', or zod schemas with no.optional()(Vercel AI SDK auto-emitsadditionalProperties: falsefor those).Test plan
q-section2.pdfto questionnaire auto-fill — questions should populatecontent-extractorpath) — still worksparse-questionnairetask completes without "Error parsing chunk" logsSummary by cubic
Fixes questionnaire auto‑fill returning zero questions by making our JSON schemas compatible with OpenAI strict mode. Adds
additionalProperties: falseand requiresanswer, sogpt-5-miniparses chunks correctly instead of failing silently.additionalProperties: falseto root and nested objects inquestion-parser.tsandcontent-extractor.ts.answertorequired(still nullable).Written for commit 9f8d33e. Summary will update on new commits.