| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Two issues prevented paper_flow from running against current OpenAI
Agents SDK:
1. Strict JSON schema mode rejects nested Pydantic models that use
extra="forbid" with additionalProperties. Wrap the output_type in
AgentOutputSchema(strict_json_schema=False) so the SDK does not
enforce strict mode on the response schema.
2. The LLM generates human-readable node IDs ("root", "introduction")
instead of valid UUID4 strings, causing Pydantic validation failures
on TreeKnowledge's UUID-typed fields. Add explicit UUID4 format
instructions to the agent prompt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Context
paper_flow fails at runtime with OpenAI Agents SDK v0.17.x due to two independent issues:
Schema error: The SDK's strict mode requires all object types to omit additionalProperties, but QuantMind's BaseKnowledge and related models use ConfigDict(extra="forbid") which sets additionalProperties: false. The SDK rejects this at agent construction time.
UUID validation error: With strict mode disabled, the LLM returns the correct tree structure but uses descriptive strings as node IDs. Pydantic then rejects the response because TreeNode.node_id, TreeKnowledge.root_node_id, and related fields are typed as UUID.
Both fixes are minimal and localised to paper.py.
Test plan
🤖 Generated with Claude Code