-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Bug
When using PictureDescriptionApiOptions with an external API that returns finish_reason: "content_filter" (e.g., Azure OpenAI with content safety filters enabled), the picture description is silently dropped. No warning is logged about the content filtering, and an empty string is stored as the description text.
api_image_request() in docling/utils/api_image_request.py only logs VlmStopReason.LENGTH and VlmStopReason.END_OF_SEQUENCE. Suggest adding VlmStopReason.FILTERED.
Steps to reproduce
Happens even with entirely innocent images. Attached example. Prompt: "
Describe the image in no more than three concise sentences. For graphs, mention the ranges of each axis. If the image is decorative, like a natural landscape or abstract patterns, just say 'decorative image'. "If there are people in the image, describe them and include their demographics like age and gender where possible. Do not invent text or data."
Docling version
2.73
Python version
3.12
