_parse_json_from_text always returns a dict (never None), so the previous `if parsed is not None` guard was permanently true — garbled docuvision output would return an empty skeleton instead of falling through to the local VLM. Replace the check with a meaningful-content test (items or merchant present). Add two tests: one that asserts the fallthrough behavior on an empty parse, one that confirms the fast path is taken when parsing succeeds. |
||
|---|---|---|
| .. | ||
| export | ||
| image_preprocessing | ||
| ocr | ||
| quality | ||
| recipe | ||
| __init__.py | ||
| barcode_scanner.py | ||
| expiration_predictor.py | ||
| inventory_service.py | ||
| openfoodfacts.py | ||
| receipt_service.py | ||
| receipt_service_inmemory_backup.py | ||