feat(2.0): W1 — fast-Spur ohne Thinking (flotte Antworten) + tool-call-Cap

Gateway injiziert chat_template_kwargs.enable_thinking=false fuer die fast-
Spur (Qwen3.6 ist Reasoning-Modell → sonst lahm/leer). heavy behaelt
Thinking. Env MC_FAST_NO_THINK. Hermes-Thrash war poisoned Persistent-
Session (fresh=clean, 34k statt 249k verifiziert); code_execution.max_tool_
calls 50->20 auf der Box (Historie unangetastet).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-06-25 14:24:57 +02:00
parent 77b6dee02f
commit 501ba36b89
3 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -12,7 +12,7 @@ from fastapi import APIRouter, Request
from fastapi.responses import JSONResponse, StreamingResponse
from config import LLAMA_SWAP_URL
from services.router_logic import choose_model
from services.router_logic import FAST, FAST_NO_THINK, choose_model
router = APIRouter(prefix="/v1")
@@ -32,7 +32,11 @@ async def _proxy(path: str, request: Request):
body["model"] = alias
routed = {"x-mc-routed-to": alias, "x-mc-route-reason": reason}
else:
alias = requested
routed = {"x-mc-routed-to": requested}
# fast-Spur: Thinking aus für flotte Antworten (sofern Client es nicht selbst setzt).
if FAST_NO_THINK and alias == FAST and "chat_template_kwargs" not in body:
body["chat_template_kwargs"] = {"enable_thinking": False}
url = f"{LLAMA_SWAP_URL}{path}"
if body.get("stream"):