feat: add topic tagging, semantic duplicate detection, and per-provider vision toggle

This commit is contained in:
mamad
2026-08-28 20:45:42 +03:30
parent b12ddc1bfd
commit 6a5971bc08
11 changed files with 409 additions and 46 deletions
+7 -4
View File
@@ -144,6 +144,9 @@ class LLMClient:
p_key = profile.api_key.strip()
p_effort = profile.reasoning_effort.strip().lower()
# Only pass image if this provider profile explicitly enables vision/image processing
active_image = image_path if (profile.supports_vision and image_path and os.path.isfile(image_path)) else None
for attempt in range(self.max_retries_per_model + 1):
try:
if p_type == "gemini" and "orcarouter" not in p_base_url:
@@ -153,7 +156,7 @@ class LLMClient:
model=p_model,
api_key=p_key or self.api_key,
reasoning_effort=p_effort or self.reasoning_effort,
image_path=image_path
image_path=active_image
)
elif p_type == "agy":
if not os.path.exists("/.dockerenv") and (shutil.which("agy") or os.path.exists("/home/mamad/.local/bin/agy")):
@@ -161,7 +164,7 @@ class LLMClient:
prompt=prompt,
system_prompt=system_prompt,
effort=p_effort or self.reasoning_effort,
image_path=image_path
image_path=active_image
)
else:
result = await self._call_openai(
@@ -172,7 +175,7 @@ class LLMClient:
api_key=p_key,
reasoning_effort=p_effort or self.reasoning_effort,
is_agy=True,
image_path=image_path
image_path=active_image
)
else:
result = await self._call_openai(
@@ -183,7 +186,7 @@ class LLMClient:
api_key=p_key or self.api_key,
reasoning_effort=p_effort or self.reasoning_effort,
is_agy=False,
image_path=image_path
image_path=active_image
)
status = "success"