refactor: Modell- und Container-Alias auf coding_model vereinheitlicht
Statt modell-spezifischer Namen (qwen3.5-single, qwen36-27b-single) wird überall der semantisch neutrale Bezeichner coding_model verwendet. Dadurch kann das Modell bei Bedarf ausgetauscht werden, ohne Konfiguration, Skripte oder Tests anpassen zu müssen. Geändert: models.json, settings.json, start-single.sh, stop-servers.sh, status.sh, pi-coder-judge-extension.ts, tests/, README.md, BEDIENUNGSANLEITUNG.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
485ab30265
commit
2b0ca79dca
10 changed files with 39 additions and 39 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// pi-coder-judge-extension.ts
|
||||
// Automatisierter Coder-Judge-Fix-Workflow für AI-Coding-Assistenten
|
||||
// Ein Modell (qwen3.5-single) auf Single-Server (Port 8001); Rollen Coder/Judge via System-Prompt
|
||||
// Ein Modell (coding_model) auf Single-Server (Port 8001); Rollen Coder/Judge via System-Prompt
|
||||
|
||||
import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
||||
import { Type } from "typebox";
|
||||
|
|
@ -432,13 +432,13 @@ async function tickTaskMdStatus(
|
|||
);
|
||||
}
|
||||
|
||||
// Single-Server: genau ein Modell (qwen3.5-single auf :8001) für beide Rollen.
|
||||
// Single-Server: genau ein Modell (coding_model auf :8001) für beide Rollen.
|
||||
// Der Rollenwechsel Coder/Judge erfolgt NICHT mehr über den Modellwechsel, sondern
|
||||
// über den System-Prompt (siehe before_agent_start-Hook + currentRole). Diese Funktion
|
||||
// stellt nur sicher, dass das eine Single-Modell aktiv ist; nach dem ersten Aufruf
|
||||
// ist der Wechsel via currentModelKey gecacht und damit ein No-op.
|
||||
const SINGLE_PROVIDER = "llama-cpp-single";
|
||||
const SINGLE_MODEL_ID = "qwen3.5-single";
|
||||
const SINGLE_MODEL_ID = "coding_model";
|
||||
|
||||
async function ensureSingleModel(
|
||||
pi: ExtensionAPI,
|
||||
|
|
@ -1071,7 +1071,7 @@ export default function (pi: ExtensionAPI) {
|
|||
ctx.ui.notify("Benutzung: /coder <auftrag>", "error");
|
||||
return;
|
||||
}
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1085,7 +1085,7 @@ export default function (pi: ExtensionAPI) {
|
|||
pi.registerCommand("judge", {
|
||||
description: "Review gegen TASK.md + git show HEAD → Judge-Rolle (:8001).",
|
||||
handler: async function (args: string, ctx: ExtensionCommandContext) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1098,7 +1098,7 @@ export default function (pi: ExtensionAPI) {
|
|||
pi.registerCommand("fix", {
|
||||
description: "Fixt Judge-Kritik, committet Ergebnis → Coder-Rolle (:8001).",
|
||||
handler: async function (args: string, ctx: ExtensionCommandContext) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1111,7 +1111,7 @@ export default function (pi: ExtensionAPI) {
|
|||
pi.registerCommand("shipit", {
|
||||
description: "Finale Freigabe gegen TASK.md + git log → Judge-Rolle (:8001).",
|
||||
handler: async function (args: string, ctx: ExtensionCommandContext) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1176,7 +1176,7 @@ export default function (pi: ExtensionAPI) {
|
|||
|
||||
// Im --continue-Modus: Single-Server prüfen (Port 8001 — Coder + Judge in einem).
|
||||
ctx.ui.setStatus("optimize", "Single-Server wird geprüft (Port 8001)…");
|
||||
const serverReady = await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single");
|
||||
const serverReady = await waitUntilModelReady(pi, ctx, 8001, "coding_model");
|
||||
if (!serverReady) {
|
||||
finalNotify(ctx, "⛔ Server nicht erreichbar", "Port 8001 — kein HTTP 200 nach 3 min. start-single.sh ausführen");
|
||||
return;
|
||||
|
|
@ -1202,7 +1202,7 @@ export default function (pi: ExtensionAPI) {
|
|||
// GPU-Ladevorgangs und ist kein verlässliches Signal. Nur HTTP 200 auf einen
|
||||
// echten Completion-Request bedeutet: Modell ist im VRAM und bereit.
|
||||
ctx.ui.setStatus("optimize", "Single-Server wird geprüft…");
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
finalNotify(ctx, "⛔ Server nicht erreichbar", "Port 8001 — kein HTTP 200 nach 3 min. start-single.sh ausführen");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1408,7 +1408,7 @@ export default function (pi: ExtensionAPI) {
|
|||
ctx.ui.notify("Benutzung: /patch <beschreibung der änderung>", "error");
|
||||
return;
|
||||
}
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1421,7 +1421,7 @@ export default function (pi: ExtensionAPI) {
|
|||
pi.registerCommand("quick_check", {
|
||||
description: "Schnelle OK/PROBLEM-Prüfung einer kleinen Codeänderung → Judge-Rolle (:8001).",
|
||||
handler: async function (args: string, ctx: ExtensionCommandContext) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1489,7 +1489,7 @@ export default function (pi: ExtensionAPI) {
|
|||
ctx.ui.notify("Benutzung: /plan <auftrag>", "error");
|
||||
return;
|
||||
}
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1571,7 +1571,7 @@ export default function (pi: ExtensionAPI) {
|
|||
}
|
||||
|
||||
// Standard-Verhalten: unterbrochenen Prozess wieder aufnehmen
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "qwen3.5-single")) {
|
||||
if (!await waitUntilModelReady(pi, ctx, 8001, "coding_model")) {
|
||||
ctx.ui.notify("Server nicht bereit (Port 8001) — start-single.sh ausführen", "error");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue