ecarjat teaches Mike to read scanned documents

The review pipeline no longer chokes on PDFs that have no text underneath the image.

discoveryintake

Plenty of legal documents arrive as scans - photographed contracts, faxed exhibits, old filings pulled from a basement. To a computer, these are just pictures: there's no text to pull out, so most extraction tools quietly fail or return nothing. ecarjat closes that gap. When the pipeline tries to pull text from a document and comes up empty, it now hands the raw pages straight to the AI model as images, letting the model look at the page the way a person would and fill in the answers anyway.

The work routes to whichever model is configured to handle the job, and on extraction tasks it deliberately skips the model's slower reasoning step to keep costs down - sensible, given that reading a value off a page rarely needs deep deliberation.

So what Anyone whose document sets are full of scans - discovery teams, litigators working off paper exhibits - gets usable extraction where they previously got blanks.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from ecarjat/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
74564426 feat: native PDF vision for scanned documents Emmanuel Carjat 2026-05-11 ↗ GitHub
commit body
Add multimodal PDF processing so scanned PDFs (no text layer) can be
analysed by Gemini and Claude models instead of returning empty results.

- streamGeminiMultimodal: pass raw PDF bytes as inlineData to Gemini
- streamClaudeMultimodal: pass raw PDF bytes as document content block to Claude
- loadSourceTexts: store rawPdfBase64 when pdfjs extracts no text
- queryGeminiAllColumns: dispatch to vision path for Gemini/Claude;
  return a clear grey error cell for OpenAI (no native PDF support)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-398.md from inside the repo you want the changes in.

⬇ Download capture-thread-398.md