Resilient LLM runner: model fallback chain, provider-death blacklist, cooldown, ANSI-repair

- llm.py: single retry/fallback/cooldown authority used by analyze/verify/pipeline
- provider [404] blacklists model + switches; rate limit escalates then cooldown
- unparsable model output (bad JSON/ANSI noise) skips to next model
- verify.py: DS_VERIFY_TIMEOUT, true rate-limit handling, honest FAILED reporting
- pipeline_all.py: honors model, reports verify status accurately
- aggregate.py: skip epNNNN_corrected.json strays (was duplicating ep 304)
- gitignore data outputs; drop stray analysis/analyst/analysts dirs
This commit is contained in:
n3wk
2026-08-29 03:26:56 +02:00
parent 06724d7dc1
commit 2719e4319d
6 changed files with 463 additions and 226 deletions
+5 -2
View File
@@ -9,20 +9,23 @@ Contents:
"""
import json
import os
import re
from datetime import datetime, timezone
from config import DATA_DIR
from analyze import ANALYSIS_DIR, MASTER_JSON
from feed import load_episodes
_EP_FILE_RE = re.compile(r"^ep\d{4}\.json$")
def load_analyses() -> list[dict]:
out = []
if not os.path.isdir(ANALYSIS_DIR):
return out
for f in sorted(os.listdir(ANALYSIS_DIR)):
if not f.endswith(".json"):
continue
if not _EP_FILE_RE.match(f):
continue # ignore stray files like epNNNN_corrected.json
try:
with open(os.path.join(ANALYSIS_DIR, f), encoding="utf-8") as fh:
out.append(json.load(fh))