This commit is contained in:
@@ -439,6 +439,26 @@ test("orchestration inherits deep-lo and falls back to good-lo with available wo
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
test("custom deep assignments are optional and a partial deep tier falls back to good-lo", async () => {
|
||||
for (const omitted of [["deep-lo", "deep-hi"], ["deep-lo"], ["deep-hi"]] as const) {
|
||||
const agents: Partial<ReturnType<typeof customAssignments>> = customAssignments();
|
||||
for (const name of omitted) delete agents[name];
|
||||
const result = await host(allModels, { mode: "custom", agents });
|
||||
expect(result.agents.get("coordinate")?.model).toMatchObject({
|
||||
id: "gpt-6-sol",
|
||||
variant: "low",
|
||||
});
|
||||
expect(result.agents.get("coordinate")?.system).toContain("Deep agents are unavailable");
|
||||
for (const name of ["fast-lo", "fast-hi", "good-lo", "good-hi"])
|
||||
expect(result.agents.has(name)).toBe(true);
|
||||
expect(result.agents.has("deep-lo")).toBe(false);
|
||||
expect(result.agents.has("deep-hi")).toBe(false);
|
||||
expect((await result.tools("coordinate")).subagent?.input.properties).toMatchObject({
|
||||
agent: { type: "string", enum: ["fast-lo", "fast-hi", "good-lo", "good-hi"] },
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
test("registers the embedded anti-overengineering skill and makes it available to coordinate", async () => {
|
||||
const result = await host();
|
||||
const skill = result.skills.get("anti-overengineering")!;
|
||||
@@ -499,6 +519,23 @@ test("custom assignments resolve duplicate model IDs by provider and refresh pro
|
||||
|
||||
test("custom configuration requires qualified models and rejects obsolete fields", () => {
|
||||
expect(() => settings.parse({ mode: "custom", agents: customAssignments() })).not.toThrow();
|
||||
for (const omitted of [["deep-lo", "deep-hi"], ["deep-lo"], ["deep-hi"]] as const) {
|
||||
const agents: Partial<ReturnType<typeof customAssignments>> = customAssignments();
|
||||
for (const name of omitted) delete agents[name];
|
||||
expect(() => settings.parse({ mode: "custom", agents })).not.toThrow();
|
||||
}
|
||||
for (const name of ["fast-lo", "fast-hi", "good-lo", "good-hi"] as const) {
|
||||
const agents: Partial<ReturnType<typeof customAssignments>> = customAssignments();
|
||||
delete agents[name];
|
||||
expect(() => settings.parse({ mode: "custom", agents })).toThrow();
|
||||
}
|
||||
for (const name of ["deep-lo", "deep-hi"] as const)
|
||||
expect(() =>
|
||||
settings.parse({
|
||||
mode: "custom",
|
||||
agents: { ...customAssignments(), [name]: { model: "test/model" } },
|
||||
}),
|
||||
).toThrow();
|
||||
for (const model of ["bare", "/model", "provider/"])
|
||||
expect(() =>
|
||||
settings.parse({
|
||||
|
||||
Reference in New Issue
Block a user