fix: hide stale and effort-preset models without losing checks
Build and deploy / build-deploy (push) Waiting to run

This commit is contained in:
2026-10-27 09:44:23 +00:00
parent 3ac835ab7e
commit 631b44666f
4 changed files with 93 additions and 13 deletions
+5 -1
View File
@@ -81,7 +81,11 @@ def _ensure_usage_columns(db: sqlite3.Connection):
def run():
db = sqlite3.connect(DB_PATH, check_same_thread=False)
_ensure_usage_columns(db)
models = [r[0] for r in db.execute("SELECT id FROM models").fetchall()]
model_cols = [r[1] for r in db.execute("PRAGMA table_info(models)")]
if "active" not in model_cols:
db.execute("ALTER TABLE models ADD COLUMN active INTEGER NOT NULL DEFAULT 1")
db.commit()
models = [r[0] for r in db.execute("SELECT id FROM models WHERE active = 1").fetchall()]
db.close()
print(f"[probe] checking {len(models)} models @ {datetime.now(timezone.utc).isoformat()}")