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" DEFAULT_HOST = "192.168.178.151"
# Modelle/Lanes, die der Gateway anbietet. Lanes zuerst: 'coding' (agentischer Coder) ist der # IDEs bekommen NUR die 'coding'-Lane zu sehen — die Lane routet intern selbst auf das
# Standard für IDEs, 'chat' für Allgemeines; dahinter die direkten Aliase. # passende Modell (Coder/Heavy/…). Ein einziger Eintrag, kein manuelles Modell-Wählen mehr.
GATEWAY_MODELS = ["coding", "chat", "fast", "heavy", "coder", "vision"] IDE_MODEL = "coding"
def _gw(host: str) -> str: def _gw(host: str) -> str:
@@ -44,7 +44,7 @@ def build_snippets(host: str = DEFAULT_HOST,
"npm": "@ai-sdk/openai-compatible", "npm": "@ai-sdk/openai-compatible",
"name": "Bosgame Gateway", "name": "Bosgame Gateway",
"options": {"baseURL": gw, "apiKey": "local"}, "options": {"baseURL": gw, "apiKey": "local"},
"models": {m: {"name": m} for m in GATEWAY_MODELS}, "models": {IDE_MODEL: {"name": IDE_MODEL}},
} }
} }
}, indent=2) }, indent=2)
@@ -61,8 +61,8 @@ def build_snippets(host: str = DEFAULT_HOST,
"bosgame": { "bosgame": {
"api_url": gw, "api_url": gw,
"available_models": [ "available_models": [
{"name": m, "display_name": m, "max_tokens": 131072, {"name": IDE_MODEL, "display_name": IDE_MODEL, "max_tokens": 131072,
"capabilities": {"tools": True}} for m in GATEWAY_MODELS "capabilities": {"tools": True}}
], ],
} }
} }
@@ -70,15 +70,15 @@ def build_snippets(host: str = DEFAULT_HOST,
"assistant": { "assistant": {
"default_model": { "default_model": {
"provider": "openai_compatible", "provider": "openai_compatible",
"model": "coding" "model": IDE_MODEL
} }
} }
}, indent=2) }, indent=2)
cont = json.dumps({ cont = json.dumps({
"models": [ "models": [
{"title": f"Bosgame / {m}", "provider": "openai", "model": m, {"title": f"Bosgame / {IDE_MODEL}", "provider": "openai", "model": IDE_MODEL,
"apiBase": gw, "apiKey": "local"} for m in ("coding", "chat", "coder") "apiBase": gw, "apiKey": "local"}
] ]
}, indent=2) }, 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. # Leitung 1 — das MODELL. Alle Snippets zeigen auf den OpenAI-kompatiblen Gateway.
"tools": { "tools": {
"cline": {"label": "Roo Code / Cline", "lang": "json", "snippet": cline, "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, "cursor": {"label": "Cursor", "lang": "json", "snippet": cursor,
"note": "Einstellungen ➔ Models ➔ OpenAI API key + Base URL."}, "note": "Einstellungen ➔ Models ➔ OpenAI API key + Base URL."},
"opencode": {"label": "OpenCode", "lang": "jsonc", "snippet": opencode, "opencode": {"label": "OpenCode", "lang": "jsonc", "snippet": opencode,