diff --git a/agent_v0/server_v1/api_stream.py b/agent_v0/server_v1/api_stream.py index 49e22ec98..b0bf983bf 100644 --- a/agent_v0/server_v1/api_stream.py +++ b/agent_v0/server_v1/api_stream.py @@ -3532,7 +3532,8 @@ def _resolve_by_som( # Pour les icônes sans texte : comparer le crop de référence contre # chaque région YOLO détectée par SomEngine. anchor_b64 = target_spec.get("anchor_image_base64", "") - if anchor_b64 and not anchor_label: + by_text = target_spec.get("by_text", "").strip() + if anchor_b64 and (not anchor_label or not by_text): try: import cv2 import numpy as np