fix: call_gemini_with_retry returns full list for JSON lists, enabling bulk evaluations

This commit is contained in:
Nubenetes Bot
2026-06-01 23:35:51 +02:00
parent fe00e0eaf9
commit 425faacf89

View File

@@ -363,7 +363,7 @@ async def call_gemini_with_retry(prompt: str, response_format: str = "json", max
if match:
try:
data = json.loads(match.group(0))
return data[0] if isinstance(data, list) and len(data) > 0 else data
return data
except: pass
# QUALITY UPGRADE: If flash failed parsing, don't give up on the key, try a Pro model