Fix Paper output schema compatibility with OpenAI Agents strict schema validation - #81
Fix Paper output schema compatibility with OpenAI Agents strict schema validation#81Auzdog wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request has been inactive for 14 days and is now marked stale. It will be closed in 7 days if there is no further activity. Comment or remove the stale label to keep it open. |
bozarnr
left a comment
There was a problem hiding this comment.
Reviewed the Paper output schema compatibility change. Wrapping the default Paper output type with AgentOutputSchema(strict_json_schema=False) is narrowly scoped to the problematic default, while custom output_type callers still pass through unchanged. A targeted regression test around the generated Agent kwargs would make this compatibility contract easier to preserve.
|
This pull request has been inactive for 14 days and is now marked stale. It will be closed in 7 days if there is no further activity. Comment or remove the stale label to keep it open. |
Problem
OpenAI Agents strict schema validation rejects
Paperas anAgentoutput type becauseTreeKnowledge.nodesis a dict-valued field and the generated JSON schema includesadditionalProperties.Observed error
"Strict JSON schema is enabled, but the output type is not valid..."
"additionalProperties should not be set for object types."
Environment
Fix
Wrap the default
Paperoutput type withAgentOutputSchema(Paper, strict_json_schema=False)whenoutput_typeis the basePaperclass. Custom output types continue to pass through unchanged.Validation
paper_flowruns successfully onRawTextinput (downstream wrapper smoke on OpenAI Agents 0.17.5)bash scripts/verify.sh: ruff format, ruff check, basedpyright, lint-imports — PASSpytest --cov: 232 passed, 1 failed (test_local_file_branch— Windows/tmpvs\tmppath assertion; unrelated to this patch)