feat: add AI descriptions and platform submission checks

This commit is contained in:
yuxuanhui
2026-09-09 20:24:47 +08:00
parent 6b4990f100
commit 53b01eb770
16 changed files with 1007 additions and 4 deletions
+3
View File
@@ -18,6 +18,7 @@ def settings_output(row):
return {
"base_url": row.base_url,
"model": row.model,
"description_model": row.description_model,
"protocol": row.protocol,
"configured": bool(row.api_key_encrypted),
"enabled": row.enabled,
@@ -49,6 +50,8 @@ def router(runtime):
row.revision += 1
row.tested_revision, row.test_results = None, {}
row.base_url, row.model, row.protocol = body.base_url, body.model, body.protocol
if "description_model" in body.model_fields_set:
row.description_model = body.description_model
if key:
row.api_key_encrypted = cipher(runtime.settings).encrypt(key.encode()).decode()
row.enabled = body.enabled and row.tested_revision == row.revision