fix: block pipeline at needs_review when no model detected

Without a model name/number specs research is pointless. Stays at
needs_review so the user can enter the model manually, then re-run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simon Kuehn 2026-05-18 10:17:25 +00:00
parent 4d223c37c1
commit fc628df42b

View file

@ -43,12 +43,8 @@ final class PhotoUploadHandler
]); ]);
$this->jobRepository->save($job); $this->jobRepository->save($job);
$hasAnyInfo = '' !== $result['manufacturer'] if ('' === $result['modelName'] && '' === $result['modelNumber']) {
|| '' !== $result['modelName'] $job->markNeedsReview('OllamaVisionAgent: no model detected — add model name/number manually and re-run');
|| '' !== $result['modelNumber'];
if (!$hasAnyInfo) {
$job->markNeedsReview('OllamaVisionAgent: nothing readable on nameplate');
$this->jobRepository->save($job); $this->jobRepository->save($job);
return; return;