fix(ide): upgrade managed agent and migrate existing member media connection

This commit is contained in:
2026-09-05 15:35:04 +03:00
parent c612120b7e
commit 8f38fd53e4
6 changed files with 54 additions and 3 deletions
+10
View File
@@ -1,6 +1,16 @@
"""Connect the AITURK distribution's media tools to its existing member key."""
def configure_existing_media(cfg: dict) -> bool:
"""Migrate an existing member endpoint when the upgraded backend starts."""
providers = cfg.get("providers") or {}
entries = providers.values() if isinstance(providers, dict) else []
for entry in entries:
if isinstance(entry, dict) and configure_media(cfg, entry):
return True
return False
def configure_media(cfg: dict, entry: dict) -> bool:
if entry.get("base_url", "").rstrip("/") != "https://ai.turkservis.online/v1":
return False