Summary
On session initialization, when the primary model (ollama/phi4-mini:latest) is unavailable (Ollama process running but model unresponsive), the main agent skips the configured 2nd fallback (openai/gpt-5.4-mini) and launches directly on the 3rd fallback (anthropic/claude-sonnet-4-6).
Environment
- OpenClaw version: 2026.4.14
- Host: macOS Darwin 24.6.0 (arm64)
- Channel: iMessage
- Agent:
main (default)
Agent model config (from openclaw.json)
{
"id": "main",
"default": true,
"model": {
"primary": "ollama/phi4-mini:latest",
"fallbacks": [
"openai/gpt-5.4-mini",
"anthropic/claude-sonnet-4-6"
]
}
}
Steps to Reproduce
- Ollama is running (
pgrep -x ollama returns a PID) but phi4-mini is unresponsive or slow to load.
- Start a new OpenClaw session via iMessage (or
/new).
- Session initializes on
anthropic/claude-sonnet-4-6 instead of openai/gpt-5.4-mini.
Expected Behavior
Fallback chain should be respected in order:
ollama/phi4-mini:latest (primary) — fails
openai/gpt-5.4-mini (1st fallback) — should be selected
anthropic/claude-sonnet-4-6 (2nd fallback) — only if gpt-mini also fails
Actual Behavior
Session launched on anthropic/claude-sonnet-4-6 (3rd in chain), skipping openai/gpt-5.4-mini entirely.
Runtime header (from session)
model=anthropic/claude-sonnet-4-6 | default_model=ollama/phi4-mini:latest
Additional Notes
- After restarting Ollama (
pkill ollama && open -a Ollama), phi4-mini loads correctly.
- The
openclaw.json config is correctly structured — this appears to be a fallback selection bug at session init, not a config issue.
- This has a real cost impact: Sonnet is significantly more expensive than gpt-5.4-mini.
Summary
On session initialization, when the primary model (
ollama/phi4-mini:latest) is unavailable (Ollama process running but model unresponsive), the main agent skips the configured 2nd fallback (openai/gpt-5.4-mini) and launches directly on the 3rd fallback (anthropic/claude-sonnet-4-6).Environment
main(default)Agent model config (from
openclaw.json){ "id": "main", "default": true, "model": { "primary": "ollama/phi4-mini:latest", "fallbacks": [ "openai/gpt-5.4-mini", "anthropic/claude-sonnet-4-6" ] } }Steps to Reproduce
pgrep -x ollamareturns a PID) but phi4-mini is unresponsive or slow to load./new).anthropic/claude-sonnet-4-6instead ofopenai/gpt-5.4-mini.Expected Behavior
Fallback chain should be respected in order:
ollama/phi4-mini:latest(primary) — failsopenai/gpt-5.4-mini(1st fallback) — should be selectedanthropic/claude-sonnet-4-6(2nd fallback) — only if gpt-mini also failsActual Behavior
Session launched on
anthropic/claude-sonnet-4-6(3rd in chain), skippingopenai/gpt-5.4-minientirely.Runtime header (from session)
Additional Notes
pkill ollama && open -a Ollama), phi4-mini loads correctly.openclaw.jsonconfig is correctly structured — this appears to be a fallback selection bug at session init, not a config issue.