73b3032069
- Updates AGENTS.md to clarify that production must keep invoice data on the same host as the model runtime, while shared LAN endpoints are acceptable for integration testing and staging. - Bumps pyproject.toml version to 0.1.0-dev and adds development status classifiers. - Adds CHANGELOG.md with Unreleased and 0.1.0 entries.
2.3 KiB
2.3 KiB
Changelog
All notable changes to odoo-ocr are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Added
- End-to-end CLI pipeline (
odoo-ocr process) that orchestrates classifier → OCR branch → extraction → review → XML/sidecar. - Document classifier with heuristic fallback to a small VLM (
Qwen2.5-VL-3B). - Four OCR/processing branches:
digital_pdf,scanned_print,handwritten, andmixed_unknown. - Unified
BaseVLMClientinterface supporting Ollama (primary) and future llama.cpp server integration. - Per-model-call metrics logging (latency, tokens, prompt hash) and exponential-backoff retries for transient failures.
- File-based LLM response cache keyed by prompt, image hashes, model, temperature, response format, and max tokens.
- Structured extraction and review stages using Pydantic
ExtractedInvoiceandReviewResultschemas. - Vision review stage that compares the original invoice image(s) with the extracted JSON and can emit a corrected invoice.
- Odoo Enterprise vendor-bill XML generation with
res.partner,account.move,account.move.line, and deterministicaccount.taxrecords. - Confidence-based XML gating:
>= 0.90: final XML.0.75–0.89: XML with a human-review advisory comment.< 0.75: sidecar JSON only; XML generation refused.
- Strict ISO 8601 date validation for
invoice_dateanddue_date. - Test coverage: 38 unit/integration tests across schemas, cache, classifier, branches, reviewer, XML builder, and CLI.
Changed
- Bumped
tool.mypy.python_versionto3.12so third-party stubs parse cleanly, whilerequires-pythonstays at>=3.11.
Project Rules
- Clarified the local-only / privacy constraint: production deployments must keep invoice data on the same host as the model runtime unless explicitly approved; shared LAN endpoints (e.g. a dedicated Ollama server on the local network) are acceptable for integration testing and staging.
[0.1.0] - 2026-08-21
Added
- Initial project scaffold: local invoice OCR pipeline with Ollama, classifier branches, structured extraction, review, and Odoo XML export.