Part of the Agent migration epic (roadmap: Weeks 3–4 → July). Owner: Jack.
Goal
Migrate the document classify/extract step off the raw Gemini seam onto a Pydantic AI agent.
Remaining call sites
backend/routes/documents.py:150 — call_gemini_json(prompt, model=MODEL_LITE)backend/routes/documents.py:225 — call_gemini_json(prompt)
Notes
Acceptance
documents.py no longer imports/calls call_gemini_json; classification/extraction runs through the agent.- Existing document tests pass; add coverage for the agent path in
backend/tests/.
Part of the Agent migration epic (roadmap: Weeks 3–4 → July). Owner: Jack.
Goal
Migrate the document classify/extract step off the raw Gemini seam onto a Pydantic AI agent.
Remaining call sites
backend/routes/documents.py:150—call_gemini_json(prompt, model=MODEL_LITE)backend/routes/documents.py:225—call_gemini_json(prompt)Notes
classifierandsummaryagents already exist (backend/agents/) and are wired elsewhere — reuse/extend them rather than adding a new one; keep model slots inagents/_providers.py._process_document(CLAUDE.md "refactor target Add Personal Client-Side Definitive Study Guides #1") and with [P2] Document pipeline robustness: post-result fallback double-fire, empty-OCR persistence, blocking IO, wrong size message #132 (document pipeline robustness, assigned to Andres) so the legacy Gemini fallback path is retired cleanly, not duplicated.Acceptance
documents.pyno longer imports/callscall_gemini_json; classification/extraction runs through the agent.backend/tests/.