[haik]: refactor: standardize backend naming and import structure - strip leading underscores from all internal functions/constants across agents, settings, session, and provider modules in favor of public names or P_ prefix for module-private symbols; replace nine_router/init.py barrel re-exports with direct submodule imports (process, sync, sync_custom, oauth); hoist inline stdlib imports to module level; delete dead openai_passthrough.py GPT-5 proxy and the redundant _save_settings alias

This commit is contained in:
haikdc
2026-06-13 19:30:34 -07:00
parent 211f939560
commit f0d3cabc47
28 changed files with 384 additions and 606 deletions
+5 -5
View File
@@ -193,16 +193,16 @@ async def _refresh_9r_connected() -> set[str]:
(e.g. {"claude", "codex", "antigravity", "gemini-cli"}). Cached for
20s to keep search/fetch endpoints snappy."""
global _NINE_ROUTER_CONNECTED, _NINE_ROUTER_CACHE_AT
import time as _t
now = _t.time()
import time
now = time.time()
if now - _NINE_ROUTER_CACHE_AT < 20.0:
return _NINE_ROUTER_CONNECTED
try:
from backend.apps.nine_router import is_running as _9r_running, get_providers as _9r_providers
if not _9r_running():
from backend.apps.nine_router.process import is_running, get_providers
if not is_running():
_NINE_ROUTER_CONNECTED = set()
else:
conns = await _9r_providers()
conns = await get_providers()
_NINE_ROUTER_CONNECTED = {
c.get("provider")
for c in conns