Fix startup and Gemini provider handling

This commit is contained in:
Krikorios
2026-05-07 12:45:01 +03:00
parent b9b3c5512f
commit 54dd52639d
8 changed files with 189 additions and 132 deletions
+3 -1
View File
@@ -12,6 +12,7 @@ from services.extractor import (
extract_document,
get_available_providers,
get_default_provider,
provider_supports_ai_verification,
verify_page_correlation,
)
from services.search_service import normalize_arabic, _normalize_scope
@@ -336,7 +337,8 @@ async def review_document(request: Request, doc_id: int, wait: int = 0):
"providers": get_available_providers(),
"current_provider": doc.get("provider") or get_default_provider(),
"ai_verification_available": any(
provider["id"] in {"claude", "gemini"} for provider in get_available_providers()
provider_supports_ai_verification(provider["id"])
for provider in get_available_providers()
),
},
)