Skip to content

fix(ocr): warn when LLM extraction fails - #2392

Open
Chisa Kotegawa (DEOWL-kan) wants to merge 1 commit into
microsoft:mainfrom
DEOWL-kan:fix/ocr-error-warning-2313
Open

fix(ocr): warn when LLM extraction fails#2392
Chisa Kotegawa (DEOWL-kan) wants to merge 1 commit into
microsoft:mainfrom
DEOWL-kan:fix/ocr-error-warning-2313

Conversation

@DEOWL-kan

Copy link
Copy Markdown

Summary

  • emit a Python warning when LLM Vision OCR catches a client failure, so converter callers no longer hide it
  • include only the exception type in the warning while preserving the original message in OCRResult.error
  • add a regression test for warning visibility, error preservation, sensitive-message exclusion, and stream rewind

Fixes #2313.

Testing

  • python -m pytest -q packages/markitdown-ocr/tests — 42 passed
  • git diff --check

Not run locally: pre-commit (not installed in the test environment).

@DEOWL-kan

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Better exception handling/warning in LLMVisionOCRService.extract_text

1 participant