feat(2.0): Phase 6c — eingebauter OpenAI-Gateway (model:auto) statt LiteLLM

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>
This commit is contained in:
Hitonabi
2026-06-25 12:54:19 +02:00
parent db1f62227b
commit ceca2ae8e3
10 changed files with 143 additions and 99 deletions
+4 -1
View File
@@ -74,7 +74,10 @@ export interface DiscoverResp {
}
export interface RoutingResp {
routes: { name: string; target: string; api_base: string | null }[]
mode?: string
endpoint?: string
heavy_threshold_chars?: number
routes: { name: string; target: string }[]
fallbacks: Record<string, string[]>[]
context_window_fallbacks: Record<string, string[]>[]
gateway_reachable: boolean
+10 -3
View File
@@ -15,8 +15,9 @@ export function RoutingView() {
<div>
<h1 className="text-xl font-semibold">Routing</h1>
<p className="text-sm text-muted-foreground">
Der LiteLLM-Gateway bündelt alle Modelle zu einem Endpunkt. <code>auto</code> = schnell im
Alltag, eskaliert bei Bedarf auf <code>heavy</code>. Gilt für Hermes <em>und</em> Vibe Coding.
Eingebauter OpenAI-Gateway: ein Endpunkt für alle Tools. <code>model: auto</code> = schnell im
Alltag (<code>fast</code>), wechselt bei komplexen/langen Anfragen auf <code>heavy</code>.
Gilt für Hermes <em>und</em> Vibe Coding.
</p>
</div>
@@ -35,7 +36,13 @@ export function RoutingView() {
data.gateway_reachable ? "bg-emerald-500" : "bg-amber-500",
)}
/>
Gateway {data.gateway_reachable ? "online" : "offline (Config wird trotzdem angezeigt)"}
Gateway {data.gateway_reachable ? "online" : "offline"}
{data.endpoint && <span className="text-muted-foreground">· {data.endpoint}</span>}
{data.heavy_threshold_chars && (
<span className="ml-auto text-xs text-muted-foreground">
autoheavy ab {data.heavy_threshold_chars} Zeichen
</span>
)}
</div>
<div className="overflow-hidden rounded-xl border border-border bg-card">