pi-ext
bugabingas pi extensions
owned by bugabinga
test(goal): isolate configured judge model
65add84025395d4c6e56c712ebd867ee4cd61023
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (1)
extensions/goal/__tests__/integration-full.test.ts
Modified 29 29 return fileURLToPath(
new URL(
"../index.ts",
import.
meta.url));
32 -function createGoalSession(
32 +async function createGoalSession(
34 34 Parameters<
typeof createTestSession>[
0],
35 35 "extensions" | "extensionFactories" 38 - return createTestSession({
...options, extensionFactories: [goalExtension] });
38 + const session
= await createTestSession({
40 + extensionFactories: [goalExtension],
42 + mkdirSync(
join(session.cwd,
".pi"), { recursive:
true });
44 + join(session.cwd,
".pi",
"settings.json"),
45 + JSON.
stringify({ goal: { judgeModel:
"openai/gpt-4o" } }),
41 50 function doneEvent(text
: string) {
626 635 mkdirSync(
join(t.cwd,
".pi"), { recursive:
true });
628 637 join(t.cwd,
".pi",
"settings.json"),
629 - JSON.
stringify({ retry: { enabled:
false } }),
639 + goal: { judgeModel:
"openai/gpt-4o" },
640 + retry: { enabled:
false },
631 643 installSaysErrorStream(t,
"WebSocket closed 1006 Connection ended");
650 662 mkdirSync(
join(t.cwd,
".pi"), { recursive:
true });
652 664 join(t.cwd,
".pi",
"settings.json"),
653 - JSON.
stringify({ retry: { enabled:
true, maxRetries:
1 } }),
666 + goal: { judgeModel:
"openai/gpt-4o" },
667 + retry: { enabled:
true, maxRetries:
1 },
655 670 t.session.settingsManager.
applyOverrides({
656 671 retry: { enabled:
true, maxRetries:
1, baseDelayMs:
10_000 },