惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
H
Help Net Security
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
U
Unit 42
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
D
Docker
量子位
P
Proofpoint News Feed
博客园_首页
T
Tailwind CSS Blog
F
Fortinet All Blogs

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(agents): share subagent cron fallback selection ...
steipete · 2026-05-16 · via Recent Commits to openclaw:main

@@ -16,6 +16,8 @@ import {

1616

resolveAgentModelFallbacksOverride,

1717

resolveAgentModelPrimary,

1818

resolveRunModelFallbacksOverride,

19+

resolveSubagentModelConfigSelection,

20+

resolveSubagentModelFallbacksOverride,

1921

resolveAgentWorkspaceDir,

2022

resolveAgentIdByWorkspacePath,

2123

resolveAgentIdsByWorkspacePath,

@@ -514,6 +516,150 @@ describe("resolveAgentConfig", () => {

514516

).toBe(false);

515517

});

516518519+

it("resolves subagent model fallbacks from the selected subagent model source", () => {

520+

const cfg: OpenClawConfig = {

521+

agents: {

522+

defaults: {

523+

model: {

524+

primary: "anthropic/claude-opus-4-6",

525+

fallbacks: ["openai/gpt-5.4"],

526+

},

527+

subagents: {

528+

model: {

529+

primary: "kimi/kimi-code",

530+

fallbacks: ["openai-codex/gpt-5.4", "zai/glm-5"],

531+

},

532+

},

533+

},

534+

list: [

535+

{

536+

id: "research",

537+

subagents: {

538+

model: {

539+

primary: "kimi/kimi-code",

540+

fallbacks: ["openai-codex/gpt-5.4", "zai/glm-5"],

541+

},

542+

},

543+

},

544+

{

545+

id: "agent-model",

546+

model: {

547+

primary: "anthropic/claude-sonnet-4-6",

548+

fallbacks: ["google/gemini-3-pro"],

549+

},

550+

},

551+

{

552+

id: "metadata-only-subagent",

553+

model: {

554+

primary: "anthropic/claude-sonnet-4-6",

555+

fallbacks: ["google/gemini-3-pro"],

556+

},

557+

subagents: {

558+

model: { timeoutMs: 1_000 },

559+

},

560+

},

561+

{

562+

id: "fallback-only-agent-model",

563+

model: {

564+

fallbacks: ["google/gemini-3-pro"],

565+

},

566+

},

567+

{

568+

id: "fallback-only-subagent-model",

569+

subagents: {

570+

model: {

571+

fallbacks: [],

572+

},

573+

},

574+

},

575+

{

576+

id: "default-subagent",

577+

},

578+

{

579+

id: "strict",

580+

subagents: {

581+

model: "kimi/kimi-code",

582+

},

583+

},

584+

],

585+

},

586+

};

587+588+

expect(resolveSubagentModelFallbacksOverride(cfg, "research")).toEqual([

589+

"openai-codex/gpt-5.4",

590+

"zai/glm-5",

591+

]);

592+

expect(resolveSubagentModelFallbacksOverride(cfg, "agent-model")).toEqual([

593+

"google/gemini-3-pro",

594+

]);

595+

expect(resolveSubagentModelFallbacksOverride(cfg, "metadata-only-subagent")).toEqual([

596+

"google/gemini-3-pro",

597+

]);

598+

expect(resolveSubagentModelFallbacksOverride(cfg, "fallback-only-agent-model")).toEqual([

599+

"openai-codex/gpt-5.4",

600+

"zai/glm-5",

601+

]);

602+

expect(

603+

resolveSubagentModelFallbacksOverride(cfg, "fallback-only-subagent-model"),

604+

).toStrictEqual([]);

605+

expect(resolveSubagentModelFallbacksOverride(cfg, "default-subagent")).toEqual([

606+

"openai-codex/gpt-5.4",

607+

"zai/glm-5",

608+

]);

609+

expect(resolveSubagentModelFallbacksOverride(cfg, "strict")).toStrictEqual([]);

610+

});

611+612+

it("resolves the subagent model config selected for isolated runs", () => {

613+

const cfg: OpenClawConfig = {

614+

agents: {

615+

defaults: {

616+

subagents: { model: "openai/gpt-5.4" },

617+

},

618+

list: [

619+

{

620+

id: "agent-model",

621+

model: {

622+

primary: "anthropic/claude-sonnet-4-6",

623+

fallbacks: ["google/gemini-3-pro"],

624+

},

625+

},

626+

{

627+

id: "subagent-model",

628+

model: "anthropic/claude-sonnet-4-6",

629+

subagents: {

630+

model: {

631+

primary: "kimi/kimi-code",

632+

fallbacks: ["openai-codex/gpt-5.4"],

633+

},

634+

},

635+

},

636+

{

637+

id: "metadata-only-subagent",

638+

model: "anthropic/claude-sonnet-4-6",

639+

subagents: {

640+

model: { timeoutMs: 1_000 },

641+

},

642+

},

643+

],

644+

},

645+

};

646+647+

expect(resolveSubagentModelConfigSelection({ cfg, agentId: "agent-model" })).toEqual({

648+

primary: "anthropic/claude-sonnet-4-6",

649+

fallbacks: ["google/gemini-3-pro"],

650+

});

651+

expect(resolveSubagentModelConfigSelection({ cfg, agentId: "subagent-model" })).toEqual({

652+

primary: "kimi/kimi-code",

653+

fallbacks: ["openai-codex/gpt-5.4"],

654+

});

655+

expect(resolveSubagentModelConfigSelection({ cfg, agentId: "metadata-only-subagent" })).toBe(

656+

"anthropic/claude-sonnet-4-6",

657+

);

658+

expect(resolveSubagentModelConfigSelection({ cfg, agentId: "default-subagent" })).toBe(

659+

"openai/gpt-5.4",

660+

);

661+

});

662+517663

it("should return agent-specific sandbox config", () => {

518664

const cfg = {

519665

agents: {