mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-09 03:22:40 +00:00
test(config): keep agent model overrides selection-only (#83319)
* fix(config): keep subagent model overrides selection-only * fix(config): reuse agent model schema for subagents
This commit is contained in:
@@ -390,6 +390,44 @@ describe("config schema", () => {
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps per-agent model overrides limited to model selection", () => {
|
||||
const result = OpenClawSchema.safeParse({
|
||||
agents: {
|
||||
list: [
|
||||
{
|
||||
id: "main",
|
||||
model: {
|
||||
primary: "openai/gpt-5.5",
|
||||
timeoutMs: 30_000,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
});
|
||||
|
||||
it("rejects per-agent subagent model timeout config", () => {
|
||||
const result = OpenClawSchema.safeParse({
|
||||
agents: {
|
||||
list: [
|
||||
{
|
||||
id: "main",
|
||||
subagents: {
|
||||
model: {
|
||||
primary: "openai/gpt-5.5",
|
||||
timeoutMs: 30_000,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.success).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts exec command highlighting config in global and agent scopes", () => {
|
||||
const tools = ToolsSchema.parse({
|
||||
exec: {
|
||||
|
||||
Reference in New Issue
Block a user