""" Routing-Gateway-Status (eingebauter Modus). MC2 IST der Gateway: serviert `/v1/*` mit `model: auto`-Komplexitäts-Routing vor llama-swap. Kein externer LiteLLM-Dienst nötig (baut auf Python 3.14 nicht); bleibt später austauschbar. """ from config import PORT from services.llamaswap import engine_reachable from services.router_logic import FAST, HEAVY, HEAVY_CHARS def routing_summary() -> dict: return { "mode": "builtin", "endpoint": f":{PORT}/v1 (OpenAI-kompatibel)", "routes": [ {"name": "auto", "target": f"{FAST} ↔ {HEAVY} (nach Komplexität)"}, {"name": FAST, "target": "llama-swap-Alias 'fast'"}, {"name": HEAVY, "target": "llama-swap-Alias 'heavy'"}, {"name": "", "target": "llama-swap-Passthrough (lädt bei Bedarf)"}, ], "heavy_threshold_chars": HEAVY_CHARS, "fallbacks": [], "context_window_fallbacks": [], } def gateway_reachable() -> bool: # Der eingebaute Gateway lebt in MC und proxyt llama-swap → erreichbar, wenn Engine läuft. return engine_reachable()