Follow-up from PR #1 review by @milani.
Context
src/rules_agent/rules/eval.py:105-107 (and similar sites like src/rules_agent/rules/extractor.py) hand-roll OpenAI-compatible tool schemas as dict literals. pydantic-ai tools/toolsets would let us define these as typed Python objects and make the code more idiomatic.
Scope
- Evaluate whether
pydantic-ai plays nicely with the existing OpenAI-SDK-based multi-provider setup (Ollama, OpenAI, Anthropic).
- Migrate the eval judge tool schema and the extractor tool schema to
pydantic-ai toolsets.
- Update tests in
tests/test_eval.py and tests/test_extractor.py to match.
Notes
Original review comment: #1 (comment)
Follow-up from PR #1 review by @milani.
Context
src/rules_agent/rules/eval.py:105-107(and similar sites likesrc/rules_agent/rules/extractor.py) hand-roll OpenAI-compatible tool schemas as dict literals.pydantic-aitools/toolsets would let us define these as typed Python objects and make the code more idiomatic.Scope
pydantic-aiplays nicely with the existing OpenAI-SDK-based multi-provider setup (Ollama, OpenAI, Anthropic).pydantic-aitoolsets.tests/test_eval.pyandtests/test_extractor.pyto match.Notes
Original review comment: #1 (comment)