Conversation
Uses the kreuzberg API
Install is as an option package in the kreuzberg group
tomaroberts
reviewed
Aug 31, 2025
tomaroberts
reviewed
Aug 31, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the Kreuzberg OCR service to the pyonb project. It implements a new OCR option alongside existing services like marker, paddleocr, sparrow, and docling.
- Creates a new
pyonb-kreuzbergpackage with Docker support and API integration - Adds routing capabilities for Kreuzberg through the forwarding API
- Implements comprehensive test coverage for health checks and inference endpoints
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/api/test_routers.py |
Adds health check and inference tests for Kreuzberg OCR |
tests/api/test_app.py |
Includes Kreuzberg container in health check tests |
tests/.env.tests |
Adds Kreuzberg API port configuration |
src/api/requirements.txt |
Adds aiohttp dependency for async HTTP requests |
src/api/app/routers/kreuzberg.py |
Implements Kreuzberg router with health and inference endpoints |
src/api/app/main.py |
Registers Kreuzberg router and improves logging |
pyproject.toml |
Configures workspace and optional dependencies |
packages/ocr/kreuzberg/src/pyonb_kreuzberg/api.py |
Main API implementation using Litestar |
packages/ocr/kreuzberg/src/pyonb_kreuzberg/__init__.py |
Package initialization |
packages/ocr/kreuzberg/pyproject.toml |
Package configuration |
packages/ocr/kreuzberg/README.md |
Documentation for setup and usage |
packages/ocr/kreuzberg/Dockerfile |
Docker container configuration |
docker-compose.yml |
Adds Kreuzberg service definition |
.env.sample |
Updates environment variable template |
Comments suppressed due to low confidence (1)
src/api/app/routers/kreuzberg.py:1
- The
KREUZBERG_API_PORTenvironment variable is a string, butuvicorn.run()expects an integer for the port parameter. This should be converted usingint(KREUZBERG_API_PORT).
"""Routers for Kreuzberg OCR."""
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37
pybonb/packages/ocr/kreuzbergthat launches thekreuzbergrest APIuv sync --extra kreuzbergkreuzbergto the forwarding APIkreuzbergdocker servicekreuzberg-ocr/inference_singleendpoint and healthchecks