[Haik]: ckpt, initial version of NineRouter singelton

This commit is contained in:
haikdc
2026-04-05 20:58:44 -07:00
parent 28820c91eb
commit e835604a09
3 changed files with 130 additions and 33 deletions
@@ -118,3 +118,10 @@ async def get_models() -> list[dict]:
except Exception as e:
print(f"9Router models fetch failed: {e}")
return []
@typechecked
async def disconnect_provider(provider_id: str) -> bool:
async with httpx.AsyncClient(timeout=10.0) as client:
r = await client.delete(f"{NINE_ROUTER_API}/providers/{provider_id}")
return r.status_code == 200