fix: combine modelName + modelNumber for specs search query

Model numbers from OCR often have character errors (G→6, O→0 etc).
Using both fields together lets the human-readable name anchor the
search even when the model number is slightly wrong.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Simon Kuehn 2026-05-18 10:33:00 +00:00
parent b8dd64eeba
commit 4515911b27

View file

@ -39,7 +39,10 @@ final class SpecsResearchHandler
return; return;
} }
$searchSubject = $message->modelNumber !== '' ? $message->modelNumber : $message->modelName; // Combine name + number so the human-readable name anchors the search
// even when the OCR'd model number contains character errors (e.g. G→6).
$parts = array_filter([$message->modelName, $message->modelNumber]);
$searchSubject = implode(' ', $parts);
try { try {
$specsText = $this->specsAgent->research( $specsText = $this->specsAgent->research(