test(config): keep agent model overrides selection-only (#83319) · openclaw/openclaw@88585da
giodl73-repo
·
2026-05-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -390,6 +390,44 @@ describe("config schema", () => {
|
390 | 390 | ).toBe(false); |
391 | 391 | }); |
392 | 392 | |
| 393 | +it("keeps per-agent model overrides limited to model selection", () => { |
| 394 | +const result = OpenClawSchema.safeParse({ |
| 395 | +agents: { |
| 396 | +list: [ |
| 397 | +{ |
| 398 | +id: "main", |
| 399 | +model: { |
| 400 | +primary: "openai/gpt-5.5", |
| 401 | +timeoutMs: 30_000, |
| 402 | +}, |
| 403 | +}, |
| 404 | +], |
| 405 | +}, |
| 406 | +}); |
| 407 | + |
| 408 | +expect(result.success).toBe(false); |
| 409 | +}); |
| 410 | + |
| 411 | +it("rejects per-agent subagent model timeout config", () => { |
| 412 | +const result = OpenClawSchema.safeParse({ |
| 413 | +agents: { |
| 414 | +list: [ |
| 415 | +{ |
| 416 | +id: "main", |
| 417 | +subagents: { |
| 418 | +model: { |
| 419 | +primary: "openai/gpt-5.5", |
| 420 | +timeoutMs: 30_000, |
| 421 | +}, |
| 422 | +}, |
| 423 | +}, |
| 424 | +], |
| 425 | +}, |
| 426 | +}); |
| 427 | + |
| 428 | +expect(result.success).toBe(false); |
| 429 | +}); |
| 430 | + |
393 | 431 | it("accepts exec command highlighting config in global and agent scopes", () => { |
394 | 432 | const tools = ToolsSchema.parse({ |
395 | 433 | exec: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。