Skip to content

feat: add GLM-OCR SDK service adapter for local MLX deployment - #104

Closed
jonathan-teamstatus wants to merge 1 commit into
Moskize91:mainfrom
jonathan-teamstatus:feat/glm-ocr-service
Closed

jonathan-teamstatus wants to merge 1 commit into
Moskize91:mainfrom
jonathan-teamstatus:feat/glm-ocr-service

Conversation

@jonathan-teamstatus

Copy link
Copy Markdown

Summary

  • Add a lazy public service config/factory and structured GLM-OCR SDK adapter (not a raw chat endpoint).
  • Preserve native labels/reading order, map normalized geometry to source pixels, validate malformed output, and state cancellation/token-limit boundaries.
  • Add mocked tests and a sanitized real synthetic-page response. No ML runtime dependency or version bump.

Validation

  • 38 upstream tests pass; focused Pyright/pylint pass.
  • Real Apple M4 Pro: Metal MLX inference + CPU layout + localhost SDK; non-loopback Python network guard enabled.
  • Paired PDF Craft integration produces Markdown/EPUB and reusable PCEX with services stopped.

Limitations / release gate

  • SDK defaults discard footnotes; explicit retained-label config and disabled formatter merges are required.
  • Layout missed a synthetic equation; rendered footnote fidelity not validated (model altered/missed markers).
  • SDK usage is empty; token budgets are rejected, not estimated.
  • Draft pending maintainer review and upstream release; do not merge automatically.

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.

1 participant