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

推荐订阅源

Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
宝玉的分享
宝玉的分享
量子位
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
J
Java Code Geeks
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
S
SegmentFault 最新的问题
B
Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
小众软件
小众软件
The Cloudflare Blog
Y
Y Combinator Blog
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
IT之家
IT之家

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
fix: honor subagent spawn model overrides · openclaw/open...
steipete · 2026-04-28 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -40,6 +40,7 @@ Docs: https://docs.openclaw.ai

4040

### Fixes

4141
4242

- Gateway/startup: keep value-option foreground starts on the gateway fast path and skip proxy bootstrap unless proxy env is configured, reducing normal gateway startup RSS and avoiding full CLI graph loading. Thanks @vincentkoc.

43+

- Subagents/models: persist `sessions_spawn.model` and configured subagent models as child-session model overrides before the first turn, so spawned subagents actually run on the requested provider/model instead of reverting to the target agent default. Fixes #73180. Thanks @danielzinhu99.

4344

- Backup: skip installed plugin `extensions/*/node_modules` dependency trees while keeping plugin manifests and source files in archives, so local backups avoid rebuildable npm payload bloat. Fixes #64144. Thanks @BrilliantWang.

4445

- Cron/models: fail isolated cron runs closed when an explicit `payload.model` is not allowed or cannot be resolved, so scheduled jobs do not silently fall back to an unrelated agent default or paid route before configured provider proxies such as LiteLLM can run. Fixes #73146. Thanks @oneandrewwang.

4546

- Memory/QMD: back off repeated chat-turn QMD open failures while still letting memory status and CLI probes recheck immediately, so a broken sidecar dependency cannot trigger active-memory or cron retry storms. Fixes #73188 and #73176. Thanks @leonlushgit and @w3i-William.

Original file line numberDiff line numberDiff line change

@@ -4,6 +4,7 @@ import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "./defaults.js";

44

import {

55

resolveConfiguredSubagentRunTimeoutSeconds,

66

resolveSubagentModelAndThinkingPlan,

7+

splitModelRef,

78

} from "./subagent-spawn-plan.js";

89
910

function createConfig(overrides?: Record<string, unknown>): OpenClawConfig {

@@ -26,10 +27,18 @@ describe("subagent spawn model + thinking plan", () => {

2627

modelApplied: true,

2728

initialSessionPatch: {

2829

model: "claude-haiku-4-5",

30+

modelOverrideSource: "user",

2931

},

3032

});

3133

});

3234
35+

it("preserves model ids containing slashes", () => {

36+

expect(splitModelRef("openrouter/meta-llama/llama-3.3-70b:free")).toEqual({

37+

provider: "openrouter",

38+

model: "meta-llama/llama-3.3-70b:free",

39+

});

40+

});

41+
3342

it("normalizes thinking overrides into the initial patch", () => {

3443

const plan = resolveSubagentModelAndThinkingPlan({

3544

cfg: createConfig(),

@@ -69,7 +78,7 @@ describe("subagent spawn model + thinking plan", () => {

6978

expect(plan).toMatchObject({

7079

status: "ok",

7180

resolvedModel: "minimax/MiniMax-M2.7",

72-

initialSessionPatch: { model: "minimax/MiniMax-M2.7" },

81+

initialSessionPatch: { model: "minimax/MiniMax-M2.7", modelOverrideSource: "auto" },

7382

});

7483

});

7584
Original file line numberDiff line numberDiff line change

@@ -11,7 +11,14 @@ export function splitModelRef(ref?: string) {

1111

if (!trimmed) {

1212

return { provider: undefined, model: undefined };

1313

}

14-

const [provider, model] = trimmed.split("/", 2);

14+

const slash = trimmed.indexOf("/");

15+

if (slash > 0 && slash < trimmed.length - 1) {

16+

const provider = trimmed.slice(0, slash);

17+

const model = trimmed.slice(slash + 1);

18+

return { provider, model };

19+

}

20+

const provider = undefined;

21+

const model = trimmed;

1522

if (model) {

1623

return { provider, model };

1724

}

@@ -66,7 +73,12 @@ export function resolveSubagentModelAndThinkingPlan(params: {

6673

modelApplied: Boolean(resolvedModel),

6774

thinkingOverride: thinkingPlan.thinkingOverride,

6875

initialSessionPatch: {

69-

...(resolvedModel ? { model: resolvedModel } : {}),

76+

...(resolvedModel

77+

? {

78+

model: resolvedModel,

79+

modelOverrideSource: params.modelOverride?.trim() ? "user" : "auto",

80+

}

81+

: {}),

7082

...thinkingPlan.initialSessionPatch,

7183

},

7284

};

Original file line numberDiff line numberDiff line change

@@ -89,6 +89,7 @@ describe("spawnSubagentDirect runtime model persistence", () => {

8989

sessionKey: /^agent:main:subagent:/,

9090

provider: "openai-codex",

9191

model: "gpt-5.4",

92+

overrideSource: "user",

9293

});

9394

expect(pruneLegacyStoreKeysMock).toHaveBeenCalledTimes(3);

9495

expect(operations.indexOf("store:update")).toBeGreaterThan(-1);

Original file line numberDiff line numberDiff line change

@@ -97,6 +97,7 @@ export function expectPersistedRuntimeModel(params: {

9797

sessionKey: string | RegExp;

9898

provider: string;

9999

model: string;

100+

overrideSource?: "auto" | "user";

100101

}) {

101102

const [persistedKey, persistedEntry] = Object.entries(params.persistedStore ?? {})[0] ?? [];

102103

if (typeof params.sessionKey === "string") {

@@ -107,6 +108,9 @@ export function expectPersistedRuntimeModel(params: {

107108

expect(persistedEntry).toMatchObject({

108109

modelProvider: params.provider,

109110

model: params.model,

111+

providerOverride: params.provider,

112+

modelOverride: params.model,

113+

...(params.overrideSource ? { modelOverrideSource: params.overrideSource } : {}),

110114

});

111115

}

112116
Original file line numberDiff line numberDiff line change

@@ -239,6 +239,7 @@ describe("spawnSubagentDirect seam flow", () => {

239239

sessionKey: childSessionKey,

240240

provider: "openai-codex",

241241

model: "gpt-5.4",

242+

overrideSource: "user",

242243

});

243244

expect(operations.indexOf("store:update")).toBeGreaterThan(-1);

244245

expect(operations.indexOf("gateway:agent")).toBeGreaterThan(

Original file line numberDiff line numberDiff line change

@@ -241,8 +241,11 @@ function buildDirectChildSessionPatch(patch: Record<string, unknown>): Partial<S

241241

const { provider, model } = splitModelRef(patch.model.trim());

242242

if (model) {

243243

entry.model = model;

244+

entry.modelOverride = model;

245+

entry.modelOverrideSource = patch.modelOverrideSource === "auto" ? "auto" : "user";

244246

if (provider) {

245247

entry.modelProvider = provider;

248+

entry.providerOverride = provider;

246249

}

247250

}

248251

}