Skip to content

Warn when PDF LLM OCR fails - #2314

Open
eliads (eliadsbgu) wants to merge 1 commit into
microsoft:mainfrom
eliadsbgu:warn-on-llm-ocr-errors
Open

Warn when PDF LLM OCR fails#2314
eliads (eliadsbgu) wants to merge 1 commit into
microsoft:mainfrom
eliadsbgu:warn-on-llm-ocr-errors

Conversation

@eliadsbgu

Copy link
Copy Markdown

Summary

  • Warn when PDF OCR returns an OCRResult.error.
  • Cover embedded-image OCR and both full-page OCR rendering paths.
  • Preserve the existing behavior of continuing conversion after an OCR failure.

Motivation

LLMVisionOCRService.extract_text() catches client and API exceptions and returns them through OCRResult.error. PdfConverterWithOCR previously checked only OCRResult.text, making configuration errors, incompatible clients, unavailable models, and API failures indistinguishable from OCR producing no text.

Fixes #2313

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