Skip to content

fix: enforce strict schema for dynamic models#8

Draft
mateicanavra wants to merge 4 commits intomainfrom
codex/2025-08-06/investigate-issue-7-and-propose-solutions
Draft

fix: enforce strict schema for dynamic models#8
mateicanavra wants to merge 4 commits intomainfrom
codex/2025-08-06/investigate-issue-7-and-propose-solutions

Conversation

@mateicanavra
Copy link
Collaborator

Summary

  • patch pydantic.create_model to forbid extra keys so OpenAI JSON schema includes additionalProperties: false
  • add unit test verifying patched models produce strict schemas

Testing

  • ./.venv/bin/python -m pytest tests/unit/test_pydantic_patch.py -q
  • ./.venv/bin/python -m pytest -q (fails: AttributeError: <property object at 0x7fb63eb10ea0> does not have the attribute 'mkdir'; AssertionError: assert PosixPath('/workspace/mcp-graphiti') == PosixPath('/mock/repo/path'); Exception: No file; SystemExit: 1; etc.)

https://chatgpt.com/codex/tasks/task_e_689396eb8d888322a3155891ab8fed1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant