Skip to content

Doc Router

Rust CLI that checks each PDF page for a usable text layer, extracts text pages locally, sends only the rest to an OCR model via LiteLLM, and merges a page-ordered result.

Stars
30
Language
Rust
License
MIT
Published by
Community
Author
misbahsy
Last verified
Oct 2026

misbahsy/doc-router

User repository on GitHub

View on GitHub

A Document OCR Router to help route pages based on content.

Forks
6
Last pushed
Updated Sep 2026

Repo stats from the GitHub API, cached Oct 2026.

About this project

Don't pay to OCR a page that already has text on it. Most PDFs are not all-scan or all-text. A contract has two signature pages scanned in the middle. A report's appendix was photocopied. An invoice batch has every third document off a flatbed. Hand the whole file to a hosted OCR model and you pay for every page — including the ones you could have read for free, instantly, with no network call.

Quoted from the project's README. Read the full README.

Highlights

  • Page judge is Jev answering whether a page needs OCR, as one swappable trait with a local heuristic default.
  • Uses pdf-inspector for per-page structure evidence and lopdf for splitting pages for providers without a pages filter.
  • Classify previews routing with no keys or network; run merges local extraction with OCR output in page order.
  • Bench binary compares heuristic versus Jev on your corpus with cost-per-page and token-cost inputs.

Watch out

Needs Rust 1.88+ and a LiteLLM gateway with an OCR model for real runs; without a Jev key it uses the local heuristic. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

39GitHub stars
Video tool where Jev scores subtitle segments and code assembles a short highlights cut plus a de-watered full cut with timestamped summaries.
Jev Tools & CLIs#community#jevbest#catalog-import
24GitHub stars
macOS floating WeChat companion that reads the visible chat with on-device Vision OCR, judges intent and reply risk with Jev, drafts toned replies with GPT, and only fills text after you approve it.
Jev Tools & CLIs#community#jevbest#catalog-import
2GitHub stars
A Tauri desktop workspace for running coding agents side by side: parallel task queues in isolated Git worktrees, your existing agent sign-ins, and a review step before anything is merged.
Jev Tools & CLIs#community#jevbest#catalog-import
1GitHub stars
A Rust filter that reads JSONL security alerts on stdin and asks five Jev questions per alert — disposition, severity, false positive, escalation, ATT&CK class — then applies the routing policy in ordinary code you control.
Jev Tools & CLIs#community#jevbest#catalog-import
0GitHub stars
Shared 1,000 by 1,000 emoji canvas where Jev paints alongside visitors: after each stroke it picks a keyword-matching emoji and a named position relative to that stroke, and answers whether the stroke is unfinished.
Jev Tools & CLIs#community#jevbest#catalog-import
56GitHub stars
R.A.I.N. Lab is a local-first research environment. Four constrained perspectives investigate a question, quoted spans are checked against a local paper corpus, and experiments are pre-registered with host code, not a model, deciding pass, fail or inconclusive.
Jev Tools & CLIs#community#jevbest

From the Jev guides

Original write-ups on what this entry is for.

The request shape barely changes across surfaces; the surrounding contract does. When to call the API directly and when a gateway, a Worker binding, or a router entry earns its extra hop.
Jev Tools & CLIs#gateway#vercel#cloudflare
Read article
Taking a decision checkpoint out of Python: what the GGUF and browser WebGPU exports preserve, what they change, and the parity evidence the model cards publish.
Jev Tools & CLIs#open-models#local#onnx
Read article
Jev labels a record that already exists. Code moves, flags, or holds it. How the document, mail, and transfer tools keep the action out of the model.
Jev Tools & CLIs#classification#email#security
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai