Skip to content

Model override in cron agentTurn payload is ignored — falls back to default model #47381

@ramshenoy

Description

@ramshenoy

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Model override in cron agentTurn payload is stored correctly but ignored at runtime — job always falls back to the default agent model

Steps to reproduce

  1. Configure an Ollama provider with a local model (e.g. ollama/qwen2.5:7b)
  2. Create a cron job with sessionTarget: "isolated" and payload.model: "ollama/qwen2.5:7b"
  3. Trigger or wait for the job to run
  4. Check openclaw cron runs — the model shown is the default agent model, not the specified one

Expected behavior

Job runs on the model specified in the payload (e.g. ollama/qwen2.5:7b)

Actual behavior

Job runs on anthropic/claude-sonnet-4-6 (the default agent model). No error or warning is surfaced.

OpenClaw version

2026.3.13

Operating system

macOS (Apple Silicon, arm64)

Install method

Homebrew

Model

ollama/qwen2.5:7b

Provider / routing chain

Local Ollama (http://127.0.0.1:11434) → OpenClaw cron isolated session → payload model: ollama/qwen2.5:7b → actual runtime model: anthropic/claude-sonnet-4-6 (default agent model, ignoring payload)

Config file / key location

~/.openclaw/openclaw.json → models.providers.ollama.models[] (model registered here) Cron job payload → agentTurn.model: "ollama/qwen2.5:7b" (stored in cron jobs config) agents.defaults.model.primary: "anthropic/claude-sonnet-4-6" (this is what actually runs)

Additional provider/model setup details

  • Ollama provider configured with explicit model list (auto-discovery disabled)
  • Both ollama/qwen2.5:7b and ollama/qwen2.5:3b registered with cost: {input:0, output:0}
  • Ollama running as brew service on http://127.0.0.1:11434
  • No agentId set on the cron job (null)
  • lightContext: true was also tried — no effect on model selection
  • Reproduced across 3 consecutive runs
  • No workaround found; only changing agents.defaults.model.primary affects which model runs

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions