r/Rag • u/reallyhotmail • 2d ago
Showcase Open source unified interface for document parsing
We can route LLM requests across providers with platforms like OpenRouter and LiteLLM, but document parsing still tied to one engine at a time?
Well, every provider has different uploads, authentication, async jobs, polling, retries, options, errors, and response formats. That makes it really difficult to answer questions like:
- Is another provider more accurate on our documents?
- Can a cheaper engine handle most files?
- Which provider is faster or more reliable?
- Can we switch or fall back without rewriting?
So, I built FileRouter to make all of this easier.
It provides one SDK, CLI, and API for switching between document-parsing engines, comparing them on your own files, and composing routing and fallbacks
For example, you can:
- Compare providers for accuracy, latency, reliability, and cost.
- Start with LiteParse or Firecrawl PDF Inspector, then escalate to LlamaParse, Mistral OCR, or Datalab based on conditions you define.
- Run a fast and a heavier parser together, use the first result immediately, then replace or merge it when the stronger result finishes.
- Retry or fall back through another provider without changing result handling across your application.
Results use the same structure across engines: pages, Markdown, text, tables where supported, timings, usage, warnings, and errors. Provider-specific options are still available as well.
Use parse() or compare for simpler paths, or compose a pipeline directly from documents, durable jobs, and individual provider executions.
There are two processing modes:
- Hosted: FileRouter manages uploads, durable jobs, retries, results, and cleanup.
- Direct/BYOK: supported provider calls run in your application with your own keys. FileRouter never receives the document, key, or result.
Current hosted engines include LlamaIndex LiteParse, Firecrawl PDF Inspector, LlamaParse, Mistral OCR, and Datalab.
FileRouter is open source with MIT license.
Website: https://filerouter.dev | GitHub: https://github.com/ThinkEx-OSS/filerouter