Skip to content

feat(api): add Docling-Serve sidecar for self-hosted document OCR#429

Merged
Movm merged 1 commit intomasterfrom
feat/docling-ocr-sidecar
Jan 30, 2026
Merged

feat(api): add Docling-Serve sidecar for self-hosted document OCR#429
Movm merged 1 commit intomasterfrom
feat/docling-ocr-sidecar

Conversation

@Movm
Copy link
Copy Markdown
Collaborator

@Movm Movm commented Jan 30, 2026

Summary

  • Add docling-serve (pre-built CPU image from quay.io) as a Docker sidecar for local PDF/DOCX/PPTX/image-to-Markdown conversion
  • Route OCR via OCR_PROVIDER env var (default: mistral), with automatic fallback to Mistral when Docling is unavailable or errors
  • Fix PDF.js worker path using createRequire for monorepo hoisting

Non-breaking

  • Default provider remains mistral — existing deployments are unaffected
  • Health check gates Docling usage; try/catch provides error fallback to Mistral

Test plan

  • Deploy with OCR_PROVIDER=mistral (default) — verify existing Mistral OCR still works
  • Deploy with OCR_PROVIDER=docling but no sidecar — verify fallback to Mistral
  • Deploy with OCR_PROVIDER=docling and sidecar running — verify Docling processes documents
  • Upload PDF, DOCX, and image files through the web UI — verify end-to-end pipeline

Add docling-serve (pre-built CPU image from quay.io) as a Docker
sidecar for local PDF/DOCX/PPTX/image-to-Markdown conversion,
replacing reliance on the Mistral cloud OCR API.

- Add doclingIntegration.ts client calling /v1/convert/file
- Route OCR via OCR_PROVIDER env var (default: mistral)
- Fall back to Mistral when Docling is unavailable or errors
- Add ocr service to docker-compose.prod.yml with healthcheck
- Fix PDF.js worker path using createRequire for monorepo hoisting
@Movm Movm merged commit 7b884fe into master Jan 30, 2026
6 of 8 checks passed
Comment thread apps/api/services/OcrService/doclingIntegration.ts Dismissed
@Movm Movm deleted the feat/docling-ocr-sidecar branch March 10, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants