ceca2ae8e3
LiteLLM baut auf Python 3.14 nicht (orjson-Pin ohne cp314-Wheel). Stattdessen eingebauter Gateway in MC2: routers/gateway_proxy.py (/v1/chat/completions, /completions, /models) + services/router_logic.py (Komplexitaets-Routing fast<->heavy, Streaming-Passthrough). gateway.py/routing.py/connect.py auf builtin umgestellt (Endpunkt = MC :PORT/v1). Gleicher OpenAI-Vertrag, spaeter gegen LiteLLM austauschbar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
13 lines
317 B
Python
13 lines
317 B
Python
"""Routing-Endpoint: zeigt den eingebauten Gateway (model:auto fast↔heavy)."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from services import gateway
|
|
|
|
router = APIRouter(prefix="/api")
|
|
|
|
|
|
@router.get("/routing")
|
|
def routing() -> dict:
|
|
return {**gateway.routing_summary(), "gateway_reachable": gateway.gateway_reachable()}
|