feat: Strata als Standardmodell für Coder/Judge
/optimize, /coder, /judge, /fix nutzen ohne PI_CODER_MODEL jetzt strata/qwen3.8-flash-next-iq3_s; llama-cpp-single/coding_model über PI_CODER_MODEL. Hinweis bei nicht bereitem Server nennt strata.sh start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d2e83daa98
commit
9571361c2a
1 changed files with 30 additions and 23 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// pi-coding-extension.ts
|
||||
// Automatisierter Coder-Judge-Fix-Workflow für AI-Coding-Assistenten
|
||||
// Ein Modell (Standard: coding_model auf Single-Server :8001, sonst PI_CODER_MODEL); Rollen Coder/Judge via System-Prompt
|
||||
// Ein Modell (Standard: Strata auf :9090, sonst PI_CODER_MODEL); Rollen Coder/Judge via System-Prompt
|
||||
|
||||
import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent";
|
||||
import { Type } from "typebox";
|
||||
|
|
@ -440,14 +440,15 @@ async function tickTaskMdStatus(
|
|||
);
|
||||
}
|
||||
|
||||
// Single-Modell: genau ein Modell (Standard coding_model auf :8001, oder PI_CODER_MODEL) für beide Rollen.
|
||||
// Single-Modell: genau ein Modell (Standard Strata auf :9090, oder PI_CODER_MODEL) 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.
|
||||
// PI_CODER_MODEL="<provider>/<id>" setzt ein anderes Modell für beide Rollen (z. B. strata/qwen3.8-flash-next-iq3_s);
|
||||
// ohne die Variable bleibt es beim Single-Server auf :8001.
|
||||
const DEFAULT_SINGLE_MODEL = "llama-cpp-single/coding_model";
|
||||
// PI_CODER_MODEL="<provider>/<id>" setzt ein anderes Modell für beide Rollen (z. B. llama-cpp-single/coding_model
|
||||
// für den llama.cpp-Server auf :8001). Strata lädt sein Modell bei der ersten Anfrage selbst und gibt vorher die GPUs
|
||||
// frei (before_load in ~/nvme2n1p7_home/strata-betrieb); die Bereitschaftsprüfung wartet darauf bis zu 3 min.
|
||||
const DEFAULT_SINGLE_MODEL = "strata/qwen3.8-flash-next-iq3_s";
|
||||
const SINGLE_MODEL_SPEC = (process.env.PI_CODER_MODEL || DEFAULT_SINGLE_MODEL).trim();
|
||||
const SINGLE_PROVIDER = SINGLE_MODEL_SPEC.slice(0, SINGLE_MODEL_SPEC.indexOf("/"));
|
||||
const SINGLE_MODEL_ID = SINGLE_MODEL_SPEC.slice(SINGLE_MODEL_SPEC.indexOf("/") + 1);
|
||||
|
|
@ -461,7 +462,8 @@ function singleEndpoint(ctx: ExtensionCommandContext): string {
|
|||
|
||||
function notReadyMessage(ctx: ExtensionCommandContext): string {
|
||||
const where = singleEndpoint(ctx) || SINGLE_LABEL;
|
||||
const hint = SINGLE_MODEL_SPEC === DEFAULT_SINGLE_MODEL ? "start-coding-server.sh ausführen" : "Server starten";
|
||||
const hint = SINGLE_PROVIDER === "strata" ? "Strata starten: ~/nvme2n1p7_home/strata-betrieb/scripts/strata.sh start"
|
||||
: SINGLE_PROVIDER === "llama-cpp-single" ? "start-coding-server.sh ausführen" : "Server starten";
|
||||
return `Server nicht bereit (${where}) — ${hint}`;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue