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 logsbash
# 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.<provider>.models[] 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:
text
{"subsystem":"cron"}
"payload.model 'ollama/qwen3.5:0.8b' not allowed, falling back to agent defaults"
bash
tail -100 /tmp/openclaw/openclaw-*.log | grep -i "not allowed\|falling back"
If you see: "payload.model '<model>' not allowed, falling back to agent defaults"
→ Model is missing from agent allowlist
bash
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.
bash
openclaw cron list
Verify:
model specified in payloadollama/qwen3.5:0.8b)Add the model to agents.defaults.models in ~/.openclaw/openclaw.json:
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
}
}
}
}
Edit config: bash
nano ~/.openclaw/openclaw.json
Add to agents.defaults.models:
json
"ollama/qwen3.5:0.8b": {},
Restart gateway: bash
openclaw gateway restart
Verify: bash
openclaw cron runs --id <job-id> --limit 3
Look for "model": "qwen3.5:0.8b" instead of qwen3.5:cloud
Use the included script:
bash
python3 ~/.npm-global/lib/node_modules/openclaw/skills/cron-model-fix/scripts/add-model-allowlist.py --model ollama/qwen3.5:0.8b
MetricValueModelCloud fallbackDuration60-180 secondsInput Tokens200K-600K per runCostCloud token burn
MetricValueImprovementModelLocal (e.g., qwen3.5:0.8b)✅ FreeDuration1-13 seconds5-14x fasterInput Tokens5K-36K85-95% reductionCostZERO100% savings
After applying fix, verify:
bash
# Check for model rejection warnings
tail -50 /tmp/openclaw/openclaw-*.log | grep -i "not allowed"
# Should be EMPTY (no warnings)
bash
# 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:
bash
openclaw doctor --fix
Or restore from backup:
bash
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)