[eric] deadcode: remove unused _is_9router_available

This commit is contained in:
ciregenz
2026-05-23 10:27:36 -07:00
parent b9ce323c5f
commit dd3efa866d
2 changed files with 0 additions and 18 deletions
@@ -172,20 +172,3 @@ async def fetch_openrouter_models(api_key: str | None) -> list[dict]:
_or_models_cache.update(models=out, fetched_at=now, ok=True)
return out
def _is_9router_available() -> bool:
"""Check if 9Router is running on localhost:20128. Caches for 30 seconds."""
import time as _time
now = _time.time()
if _9router_cache["available"] is not None and now - _9router_cache["checked_at"] < 30:
return _9router_cache["available"]
try:
import httpx
r = httpx.get("http://localhost:20128/v1/models", timeout=2.0)
available = r.status_code == 200
except Exception:
available = False
_9router_cache["available"] = available
_9router_cache["checked_at"] = now
return available
-1
View File
@@ -51,7 +51,6 @@ requests_delta
thinking_params_for
_resolve_model
load_output
_is_9router_available
submit_state
get_provider_credentials
DISCOVERY_SCAFFOLDING