fix: use current selected model
This commit is contained in:
@@ -110,6 +110,28 @@ describe("check-runner integration", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("forwards the selected model to every sub-agent", async () => {
|
||||
const check = smokeCheck();
|
||||
const selectedModel = {
|
||||
provider: "test-provider",
|
||||
id: "test-model",
|
||||
} as unknown as PygieniumCtx["model"];
|
||||
const seen: unknown[] = [];
|
||||
setAgentRunner(async (opts) => {
|
||||
seen.push(opts.model);
|
||||
return fakeAgentRunner(opts);
|
||||
});
|
||||
await handleCheckCommand(
|
||||
check,
|
||||
"--fix",
|
||||
{ ...stubCtx(cwd), model: selectedModel } as PygieniumCtx,
|
||||
);
|
||||
|
||||
// Analysis + fix phases each dispatch one sub-agent.
|
||||
expect(seen.length).toBe(2);
|
||||
for (const m of seen) expect(m).toBe(selectedModel);
|
||||
});
|
||||
|
||||
it("persists run-state.json at the expected path", async () => {
|
||||
const check = smokeCheck();
|
||||
await handleCheckCommand(check, "", stubCtx(cwd));
|
||||
|
||||
Reference in New Issue
Block a user