Diagnose and fix OpenClaw cron job model override issues where configured models are rejected and fall back to agent defaults.
Use when:
"not allowed, falling back to agent defaults" in gateway logs# Diagnose the issue
openclaw skill run cron-model-fix --diagnose
# Apply the fix (adds missing models to allowlist)
openclaw skill run cron-model-fix --fix --model ollama/qwen3.5:0.8b
# Validate configuration
openclaw skill run cron-model-fix --validate
OpenClaw has three model configuration layers. ALL must include the model:
Location: models.providers.
Purpose: Defines model specs (context, costs, capabilities)
Location: agents.defaults.model.primary
Purpose: Default model when none specified
Location: agents.defaults.models
Purpose: WHICH MODELS ARE PERMITTED for agent/cron use
Problem: Model exists in Layer 1, but missing from Layer 3 (allowlist).
Gateway logs show:
{"subsystem":"cron"}
"payload.model 'ollama/qwen3.5:0.8b' not allowed, falling back to agent defaults"
tail -100 /tmp/openclaw/openclaw-*.log | grep -i "not allowed\|falling back"
If you see: "payload.model '
→ Model is missing from agent allowlist
cat ~/.openclaw/openclaw.json | python3 -c "
import json, sys
config = json.load(sys.stdin)
models = config.get('agents', {}).get('defaults', {}).get('models', {})
print('Allowed models:')
for model in models:
print(f' - {model}')
"
Check if your cron model is in the list. If not, it will be rejected.
openclaw cron list
Verify:
model specified in payloadollama/qwen3.5:0.8b)Add the model to agents.defaults.models in ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "ollama/qwen3.5:cloud",
"fallbacks": [...]
},
"models": {
"ollama/glm-4.7-flash": {},
"ollama/kimi-k2.5:cloud": {},
"ollama/qwen2.5vl:7b": {},
"ollama/qwen3.5:397b-cloud": {},
"ollama/qwen3.5:4b-32K": {},
"ollama/qwen3.5:4b-32k": {},
"ollama/qwen3.5:9b-128k": {},
"ollama/qwen3.5:cloud": {},
"ollama/qwen3.5:0.8b": {}, ← ADD THIS
"ollama/qwen3.5:2b": {} ← Optional
}
}
}
}
```bash
nano ~/.openclaw/openclaw.json
```
agents.defaults.models:```json
"ollama/qwen3.5:0.8b": {},
```
```bash
openclaw gateway restart
```
```bash
openclaw cron runs --id
```
Look for "model": "qwen3.5:0.8b" instead of qwen3.5:cloud
Use the included script:
python3 ~/.npm-global/lib/node_modules/openclaw/skills/cron-model-fix/scripts/add-model-allowlist.py --model ollama/qwen3.5:0.8b
| Metric | Value |
|---|---|
| -------- | ------- |
| Model | Cloud fallback |
| Duration | 60-180 seconds |
| Input Tokens | 200K-600K per run |
| Cost | Cloud token burn |
| Metric | Value | Improvement |
|---|---|---|
| -------- | ------- | ------------- |
| Model | Local (e.g., qwen3.5:0.8b) | ✅ Free |
| Duration | 1-13 seconds | 5-14x faster |
| Input Tokens | 5K-36K | 85-95% reduction |
| Cost | ZERO | 100% savings |
After applying fix, verify:
# Check for model rejection warnings
tail -50 /tmp/openclaw/openclaw-*.log | grep -i "not allowed"
# Should be EMPTY (no warnings)
# Check cron run history
openclaw cron runs --id <job-id> --limit 1
# Should show:
# "model": "qwen3.5:0.8b" (not cloud)
# "durationMs": <15000 (fast)
# "input_tokens": <50000 (low)
Check:
ollama/qwen3.5:0.8b vs qwen3.5:0.8b)Fix:
openclaw doctor --fix
Or restore from backup:
cp ~/.openclaw/openclaw.json.backup ~/.openclaw/openclaw.json
inbox-optimizer - Optimizes inbox scanning patterns (mesh-specific)healthcheck - General OpenClaw system health monitoringreferences/model-config-layers.md for detailed configuration structurereferences/troubleshooting-examples.md for real-world case studies1.0.0 - Initial release (2026-03-30)
共 1 个版本