@@ -115,6 +115,11 @@ export function registerCronEditCommand(cron: Command) {
|
115 | 115 | "Thinking level for agent jobs (off|minimal|low|medium|high|xhigh)", |
116 | 116 | ) |
117 | 117 | .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 | +) |
118 | 123 | .option("--timeout-seconds <n>", "Timeout seconds for agent or command jobs") |
119 | 124 | .option("--no-output-timeout-seconds <n>", "No-output timeout seconds for command jobs") |
120 | 125 | .option("--output-max-bytes <n>", "Maximum captured stdout/stderr bytes for command jobs") |
@@ -279,6 +284,9 @@ export function registerCronEditCommand(cron: Command) {
|
279 | 284 | ); |
280 | 285 | } |
281 | 286 | const model = normalizeOptionalString(opts.model); |
| 287 | +if (model && opts.clearModel) { |
| 288 | +throw new Error("Use --model or --clear-model, not both"); |
| 289 | +} |
282 | 290 | const thinking = normalizeOptionalString(opts.thinking); |
283 | 291 | const toolsAllow = parseCronToolsAllow(opts.tools); |
284 | 292 | const rawTimeoutSeconds = |
@@ -346,6 +354,7 @@ export function registerCronEditCommand(cron: Command) {
|
346 | 354 | const hasAgentTurnPayloadField = |
347 | 355 | typeof opts.message === "string" || |
348 | 356 | Boolean(model) || |
| 357 | +Boolean(opts.clearModel) || |
349 | 358 | Boolean(thinking) || |
350 | 359 | (hasTimeoutSeconds && |
351 | 360 | !hasCommandSpecificPayloadField && |
@@ -373,7 +382,11 @@ export function registerCronEditCommand(cron: Command) {
|
373 | 382 | } else if (hasAgentTurnPatch) { |
374 | 383 | const payload: Record<string, unknown> = { kind: "agentTurn" }; |
375 | 384 | 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 | +} |
377 | 390 | assignIf(payload, "thinking", thinking, Boolean(thinking)); |
378 | 391 | assignIf(payload, "timeoutSeconds", timeoutSeconds, hasTimeoutSeconds); |
379 | 392 | assignIf( |
|