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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
Y
Y Combinator Blog
IT之家
IT之家
博客园 - 聂微东
L
LangChain Blog
爱范儿
爱范儿
H
Help Net Security
GbyAI
GbyAI
F
Fortinet All Blogs
B
Blog
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
D
DataBreaches.Net
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享

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(cron): add cron edit --clear-model · openclaw/opencla...
ly-wang19 · 2026-06-15 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -157,6 +157,9 @@ If stdout is non-empty, that text is the delivered result. If stdout is empty an

157157

<ParamField path="--model" type="string">

158158

Model override; uses the selected allowed model for the job.

159159

</ParamField>

160+

<ParamField path="--clear-model" type="boolean">

161+

On `cron edit`, removes the per-job model override so the job follows normal cron model-selection precedence (a stored cron-session override if set, otherwise the agent/default model). Cannot be combined with `--model`.

162+

</ParamField>

160163

<ParamField path="--thinking" type="string">

161164

Thinking level override.

162165

</ParamField>

@@ -471,6 +474,7 @@ Model override note:

471474

- If the model is allowed, that exact provider/model reaches the isolated agent run.

472475

- If it is not allowed or cannot be resolved, cron fails the run with an explicit validation error.

473476

- API `cron.update` payload patches can set `model: null` to clear a stored job model override.

477+

- `openclaw cron edit <job-id> --clear-model` clears that override from the CLI (same effect as the `model: null` patch) and cannot be combined with `--model`.

474478

- Configured fallback chains still apply because cron `--model` is a job primary, not a session `/model` override.

475479

- Payload `fallbacks` replaces configured fallbacks for that job; `fallbacks: []` disables fallback and makes the run strict.

476480

- A plain `--model` with no explicit or configured fallback list does not fall through to the agent primary as a silent extra retry target.

Original file line numberDiff line numberDiff line change

@@ -168,7 +168,7 @@ Use `--due` when you want the manual command to run only if the job is currently

168168
169169

## Models

170170
171-

`cron add|edit --model <ref>` selects an allowed model for the job.

171+

`cron add|edit --model <ref>` selects an allowed model for the job. `cron edit <job-id> --clear-model` removes the per-job model override so the job follows normal cron model-selection precedence (a stored cron-session override if present, otherwise the agent/default model); it cannot be combined with `--model`.

172172
173173

<Warning>

174174

If the model is not allowed or cannot be resolved, cron fails the run with an explicit validation error instead of falling back to the job's agent or default model selection.

Original file line numberDiff line numberDiff line change

@@ -200,4 +200,32 @@ describe("cron edit command", () => {

200200

},

201201

);

202202

});

203+
204+

it("clears the model override with --clear-model (CLI parity with cron.update model:null)", async () => {

205+

const program = createCronProgram();

206+
207+

await program.parseAsync(["edit", "job-1", "--clear-model"], { from: "user" });

208+
209+

expect(callGatewayFromCli).toHaveBeenCalledWith(

210+

"cron.update",

211+

expect.objectContaining({ clearModel: true }),

212+

{

213+

id: "job-1",

214+

patch: {

215+

payload: {

216+

kind: "agentTurn",

217+

model: null,

218+

},

219+

},

220+

},

221+

);

222+

});

223+
224+

it("documents the --clear-model flag alongside the sibling --clear-tools", () => {

225+

const editCommand = createCronProgram().commands.find((command) => command.name() === "edit");

226+

const help = editCommand?.helpInformation() ?? "";

227+
228+

expect(help).toContain("--clear-model");

229+

expect(help).toContain("--clear-tools");

230+

});

203231

});

Original file line numberDiff line numberDiff line change

@@ -115,6 +115,11 @@ export function registerCronEditCommand(cron: Command) {

115115

"Thinking level for agent jobs (off|minimal|low|medium|high|xhigh)",

116116

)

117117

.option("--model <model>", "Model override for agent jobs")

118+

.option(

119+

"--clear-model",

120+

"Remove the per-job model override (restore normal cron model precedence)",

121+

false,

122+

)

118123

.option("--timeout-seconds <n>", "Timeout seconds for agent or command jobs")

119124

.option("--no-output-timeout-seconds <n>", "No-output timeout seconds for command jobs")

120125

.option("--output-max-bytes <n>", "Maximum captured stdout/stderr bytes for command jobs")

@@ -279,6 +284,9 @@ export function registerCronEditCommand(cron: Command) {

279284

);

280285

}

281286

const model = normalizeOptionalString(opts.model);

287+

if (model && opts.clearModel) {

288+

throw new Error("Use --model or --clear-model, not both");

289+

}

282290

const thinking = normalizeOptionalString(opts.thinking);

283291

const toolsAllow = parseCronToolsAllow(opts.tools);

284292

const rawTimeoutSeconds =

@@ -346,6 +354,7 @@ export function registerCronEditCommand(cron: Command) {

346354

const hasAgentTurnPayloadField =

347355

typeof opts.message === "string" ||

348356

Boolean(model) ||

357+

Boolean(opts.clearModel) ||

349358

Boolean(thinking) ||

350359

(hasTimeoutSeconds &&

351360

!hasCommandSpecificPayloadField &&

@@ -373,7 +382,11 @@ export function registerCronEditCommand(cron: Command) {

373382

} else if (hasAgentTurnPatch) {

374383

const payload: Record<string, unknown> = { kind: "agentTurn" };

375384

assignIf(payload, "message", String(opts.message), typeof opts.message === "string");

376-

assignIf(payload, "model", model, Boolean(model));

385+

if (opts.clearModel) {

386+

payload.model = null;

387+

} else {

388+

assignIf(payload, "model", model, Boolean(model));

389+

}

377390

assignIf(payload, "thinking", thinking, Boolean(thinking));

378391

assignIf(payload, "timeoutSeconds", timeoutSeconds, hasTimeoutSeconds);

379392

assignIf(