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:
Dieter Schlüter 2026-10-15 06:36:32 +02:00
commit 9571361c2a
4 changed files with 30 additions and 23 deletions

View file

@ -151,12 +151,14 @@ HF_HOME=/mnt/daten/huggingface ./start-coding-server.sh
### Anderes Modell für die Schleife
Ohne weitere Angabe arbeiten Coder und Judge mit `llama-cpp-single/coding_model` (Port 8001). Ein anderes Modell aus
`models.json` setzt die Umgebungsvariable `PI_CODER_MODEL` beim Start von pi, als `<provider>/<id>`:
Ohne weitere Angabe arbeiten Coder und Judge mit `strata/qwen3.8-flash-next-iq3_s` (Strata, Port 9090). Ist das
Modell entladen, lädt Strata es bei der ersten Anfrage und gibt vorher GPU 1 und 2 frei; die Bereitschaftsprüfung
wartet darauf bis zu 3 Minuten. Eingerichtet ist das in `~/nvme2n1p7_home/strata-betrieb` (dort
BEDIENUNGSANLEITUNG, „GPUs teilen“). Ein anderes Modell aus `models.json` setzt die Umgebungsvariable
`PI_CODER_MODEL` beim Start von pi, als `<provider>/<id>`, z. B. der llama.cpp-Server auf Port 8001:
```bash
PI_CODER_MODEL=strata/qwen3.8-flash-next-iq3_s \
pi --provider strata --model qwen3.8-flash-next-iq3_s
PI_CODER_MODEL=llama-cpp-single/coding_model pi
```
`--provider`/`--model` machen das Modell auch für freie Eingaben zum Standard dieses Laufs; die globalen

View file

@ -1,7 +1,7 @@
# pi_coder_2 — Automatisierter Coder/Judge-Workflow für pi agent
Dieses Repository enthält die Konfiguration und Skripte für einen automatisierten
Coding-Workflow mit einem lokalen LLaMA-Modell, das abwechselnd als Coder und Judge
Coding-Workflow mit einem lokalen Modell (Standard: Strata), das abwechselnd als Coder und Judge
agiert — gesteuert über Pi Agent. Er dreht solange Optimierungsschleifen, bis das
Programm Produktionsreife hat.
@ -13,19 +13,19 @@ Programm Produktionsreife hat.
Nutzer gibt Auftrag
│
▼
/coder → coding_model (:8001, Coder-Persona) → Implementierung + git commit
/coder → Strata (:9090, Coder-Persona) → Implementierung + git commit
│
▼
/judge → coding_model (:8001, Judge-Persona) → Review: PASS / FAIL + Blocker
/judge → Strata (:9090, Judge-Persona) → Review: PASS / FAIL + Blocker
│
FAIL? ▼
/fix → coding_model (:8001, Coder-Persona) → Fixes + git commit
/fix → Strata (:9090, Coder-Persona) → Fixes + git commit
│
PASS WITH CONCERNS? ▼
│ (ohne --approve-concerns: wie FAIL → weiterer Fix-Zyklus)
│
PASS? ▼
/shipit → coding_model (:8001, Judge-Persona) → Finale Freigabe: SHIP / NO-SHIP
/shipit → Strata (:9090, Judge-Persona) → Finale Freigabe: SHIP / NO-SHIP
(nur bei "PASS WITH CONCERNS" --approve-concerns; klares PASS → direkt SHIP)
/optimize = Coder→Judge→Fix-Schleife automatisch (bis PASS oder max. N Runden)
@ -41,15 +41,18 @@ nur die Persona im System-Prompt ändert sich.
## Modelle
| Rolle | Modell | Port | Container | Alias | GPU |
|----------------|---------------------------------------------------|------|--------------------|----------------|----------|
| Coder + Judge | Qwen3.6-27B-Uncensored-HauhauCS-Aggressive-IQ4_XS | 8001 | coding_model | coding_model | device=1 |
| Rolle | Modell (`<provider>/<id>`) | Port | Betrieb | GPU |
|---|---|---|---|---|
| Coder + Judge (Standard) | `strata/qwen3.8-flash-next-iq3_s` | 9090 | Strata-Server, `~/nvme2n1p7_home/strata-betrieb` | 1 und 2 |
| Coder + Judge (Alternative) | `llama-cpp-single/coding_model` (Qwen3.6-27B IQ4_XS) | 8001 | Container `coding_model`, `start-coding-server.sh` | 1 |
Coder- und Judge-Rollen werden durch verschiedene System-Prompts realisiert —
dasselbe Modell, derselbe Container, unterschiedliche Persona.
dasselbe Modell, unterschiedliche Persona. Freie Eingaben in pi nutzen weiter pis eigenes Standardmodell.
Ein anderes Modell für beide Rollen (z. B. den lokalen Strata-Server) setzt `PI_CODER_MODEL=<provider>/<id>`,
siehe [BEDIENUNGSANLEITUNG.md](BEDIENUNGSANLEITUNG.md#anderes-modell-für-die-schleife).
Strata lädt sein Modell bei der ersten Anfrage selbst, gibt vorher die GPUs frei und entlädt es nach 10 Minuten ohne
Anfrage (eingerichtet in `strata-betrieb`). Ein anderes Modell für beide Rollen setzt
`PI_CODER_MODEL=<provider>/<id>`, siehe
[BEDIENUNGSANLEITUNG.md](BEDIENUNGSANLEITUNG.md#anderes-modell-für-die-schleife).
---

View file

@ -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}`;
}

View file

@ -62,8 +62,8 @@ test("LICENCE.md: deterministisch in der Doku-Phase, nur wenn nicht vorhanden, p
assert.match(extSource, /new Date\(\)\.getFullYear\(\)/);
});
test("Single-Modell: Standard bleibt llama-cpp-single/coding_model, PI_CODER_MODEL überschreibt", () => {
assert.match(extSource, /DEFAULT_SINGLE_MODEL = "llama-cpp-single\/coding_model"/);
test("Single-Modell: Standard ist Strata, PI_CODER_MODEL überschreibt", () => {
assert.match(extSource, /DEFAULT_SINGLE_MODEL = "strata\/qwen3.8-flash-next-iq3_s"/);
assert.match(extSource, /process\.env\.PI_CODER_MODEL \|\| DEFAULT_SINGLE_MODEL/);
});