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

@@ -61,9 +61,19 @@ Key behaviors:
- `wakeMode: "now"` triggers an immediate heartbeat after posting the summary.
- If `payload.deliver: true`, output is delivered to a provider; otherwise it stays internal.
Use isolated jobs for noisy, frequent, or background chores that shouldnt spam
Use isolated jobs for noisy, frequent, or "background chores" that shouldn't spam
your main chat history.
### Model and thinking overrides
Isolated jobs (`agentTurn`) can override the model and thinking level:
- `model`: Provider/model string (e.g., `anthropic/claude-sonnet-4-20250514`) or alias (e.g., `opus`)
- `thinking`: Thinking level (`off`, `minimal`, `low`, `medium`, `high`)
Resolution priority:
1. Job payload override (highest)
2. Hook-specific defaults (e.g., `hooks.gmail.model`)
3. Agent config default
### Delivery (provider + target)
Isolated jobs can deliver output to a provider. The job payload can specify:
- `provider`: `whatsapp` / `telegram` / `discord` / `slack` / `signal` / `imessage` / `last`
@@ -142,6 +152,21 @@ clawdbot cron add \
--to "-1001234567890:topic:123"
```
Isolated job with model and thinking override:
```bash
clawdbot cron add \
--name "Deep analysis" \
--cron "0 6 * * 1" \
--tz "America/Los_Angeles" \
--session isolated \
--message "Weekly deep analysis of project progress." \
--model "opus" \
--thinking high \
--deliver \
--provider whatsapp \
--to "+15551234567"
```
Manual run (debug):
```bash
clawdbot cron run <jobId> --force