feat(cron): add --model flag to cron add/edit commands

Expose the existing model override capability via CLI flags:
- Add --model to cron add and cron edit commands
- Document model and thinking overrides in cron-jobs.md
- Add CLI example showing model/thinking usage

The backend already supported model in agentTurn payloads;
this change exposes it through the CLI interface.
This commit is contained in:
Matthew Russell
2026-01-10 22:32:09 -08:00
committed by Peter Steinberger
parent eec082e541
commit 314e075df2
2 changed files with 36 additions and 1 deletions

View File

@@ -296,6 +296,10 @@ export function registerCronCli(program: Command) {
"--thinking <level>",
"Thinking level for agent jobs (off|minimal|low|medium|high)",
)
.option(
"--model <model>",
"Model override for agent jobs (provider/model or alias)",
)
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
.option("--deliver", "Deliver agent output", false)
.option(
@@ -391,6 +395,10 @@ export function registerCronCli(program: Command) {
return {
kind: "agentTurn" as const,
message,
model:
typeof opts.model === "string" && opts.model.trim()
? opts.model.trim()
: undefined,
thinking:
typeof opts.thinking === "string" && opts.thinking.trim()
? opts.thinking.trim()
@@ -558,6 +566,7 @@ export function registerCronCli(program: Command) {
.option("--system-event <text>", "Set systemEvent payload")
.option("--message <text>", "Set agentTurn payload message")
.option("--thinking <level>", "Thinking level for agent jobs")
.option("--model <model>", "Model override for agent jobs")
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
.option("--deliver", "Deliver agent output", false)
.option(
@@ -643,6 +652,7 @@ export function registerCronCli(program: Command) {
patch.payload = {
kind: "agentTurn",
message: String(opts.message),
model: typeof opts.model === "string" ? opts.model : undefined,
thinking:
typeof opts.thinking === "string" ? opts.thinking : undefined,
timeoutSeconds: