Backend: Box-Sync + Drift-Fixes (Review P0-3)
- deploy/llama-swap.config.yaml: Live-Box-Config jetzt versioniert (war untracked + veraltet) - config.py: Template -fa 1 -> -fa on (Box-Standard) - llamaswap.py: cache-reuse NICHT bei mmproj-Modellen anhaengen (verifizierte Vision-Falle) - voice.py: Thinking-Deaktivierung fuer Voice-Chat (MC_VOICE_NO_THINK) - connect.py: IDE-Snippets zeigen nur noch die coding-Lane Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+10
-10
@@ -15,9 +15,9 @@ from config import LLAMA_SWAP_URL, MEM0_SERVICE_URL, PORT
|
||||
|
||||
DEFAULT_HOST = "192.168.178.151"
|
||||
|
||||
# Modelle/Lanes, die der Gateway anbietet. Lanes zuerst: 'coding' (agentischer Coder) ist der
|
||||
# Standard für IDEs, 'chat' für Allgemeines; dahinter die direkten Aliase.
|
||||
GATEWAY_MODELS = ["coding", "chat", "fast", "heavy", "coder", "vision"]
|
||||
# IDEs bekommen NUR die 'coding'-Lane zu sehen — die Lane routet intern selbst auf das
|
||||
# passende Modell (Coder/Heavy/…). Ein einziger Eintrag, kein manuelles Modell-Wählen mehr.
|
||||
IDE_MODEL = "coding"
|
||||
|
||||
|
||||
def _gw(host: str) -> str:
|
||||
@@ -44,7 +44,7 @@ def build_snippets(host: str = DEFAULT_HOST,
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "Bosgame Gateway",
|
||||
"options": {"baseURL": gw, "apiKey": "local"},
|
||||
"models": {m: {"name": m} for m in GATEWAY_MODELS},
|
||||
"models": {IDE_MODEL: {"name": IDE_MODEL}},
|
||||
}
|
||||
}
|
||||
}, indent=2)
|
||||
@@ -61,8 +61,8 @@ def build_snippets(host: str = DEFAULT_HOST,
|
||||
"bosgame": {
|
||||
"api_url": gw,
|
||||
"available_models": [
|
||||
{"name": m, "display_name": m, "max_tokens": 131072,
|
||||
"capabilities": {"tools": True}} for m in GATEWAY_MODELS
|
||||
{"name": IDE_MODEL, "display_name": IDE_MODEL, "max_tokens": 131072,
|
||||
"capabilities": {"tools": True}}
|
||||
],
|
||||
}
|
||||
}
|
||||
@@ -70,15 +70,15 @@ def build_snippets(host: str = DEFAULT_HOST,
|
||||
"assistant": {
|
||||
"default_model": {
|
||||
"provider": "openai_compatible",
|
||||
"model": "coding"
|
||||
"model": IDE_MODEL
|
||||
}
|
||||
}
|
||||
}, indent=2)
|
||||
|
||||
cont = json.dumps({
|
||||
"models": [
|
||||
{"title": f"Bosgame / {m}", "provider": "openai", "model": m,
|
||||
"apiBase": gw, "apiKey": "local"} for m in ("coding", "chat", "coder")
|
||||
{"title": f"Bosgame / {IDE_MODEL}", "provider": "openai", "model": IDE_MODEL,
|
||||
"apiBase": gw, "apiKey": "local"}
|
||||
]
|
||||
}, indent=2)
|
||||
|
||||
@@ -115,7 +115,7 @@ def build_snippets(host: str = DEFAULT_HOST,
|
||||
# Leitung 1 — das MODELL. Alle Snippets zeigen auf den OpenAI-kompatiblen Gateway.
|
||||
"tools": {
|
||||
"cline": {"label": "Roo Code / Cline", "lang": "json", "snippet": cline,
|
||||
"note": "OpenAI-Provider → Gateway. Lane 'coding' (agentischer Coder); 'chat' für Allgemeines."},
|
||||
"note": "OpenAI-Provider → Gateway. Nur Lane 'coding' — die Box routet intern selbst."},
|
||||
"cursor": {"label": "Cursor", "lang": "json", "snippet": cursor,
|
||||
"note": "Einstellungen ➔ Models ➔ OpenAI API key + Base URL."},
|
||||
"opencode": {"label": "OpenCode", "lang": "jsonc", "snippet": opencode,
|
||||
|
||||
Reference in New Issue
Block a user