Verbinden: IDE-Configs einheitlich auf eine coding-Lane (OpenCode/Zed/Continue zeigten noch alle Modelle)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-07-02 15:38:23 +02:00
parent 7e857a546b
commit 4a680b863e
+10 -10
View File
@@ -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,