---
created: 2026-03-12
tags: [sop, fleet-ops]
related: ["[[05-Knowledge/Fleet Model Plan]]", "[[02-Fleet/Fleet Map]]"]
---

# SOP: Changing Agent Models

## Before You Start
- Check [[05-Knowledge/Fleet Model Plan]] for current assignments
- Ensure fallback uses a **different provider** than the new primary
- Have the API key ready for the new provider

## Steps

### 1. Edit the config (CORRECT location)
```bash
# Rivet (main gateway):
nano /root/.openclaw/clawdbot.json
# openclaw.json is symlinked — either works

# Other agents:
nano /root/.openclaw-{agent}/clawdbot.json
```

**NEVER** edit `/root/.clawdbot/` — that's legacy and the gateway ignores it.

### 2. Update the model section
Find `agents.defaults.model` and change:
```json
{
  "primary": "provider/model-name",
  "fallbacks": [
    "different-provider/model",
    "another-provider/model"
  ]
}
```

### 3. Add API key to auth profiles (if new provider)
Edit `/root/.openclaw-{agent}/agents/main/agent/auth-profiles.json`:
```json
{
  "profiles": {
    "provider:default": {
      "type": "api_key",
      "provider": "provider-name",
      "key": "sk-..."
    }
  }
}
```

### 4. Clear session overrides
```bash
# Check for stale model overrides:
node -e "const s=JSON.parse(require('fs').readFileSync('/root/.openclaw/agents/main/sessions/sessions.json'));for(const[k,v] of Object.entries(s)){if(v.model)console.log(k,v.model)}"
```
If any exist, delete the `model` and `authProfileOverride` keys.

### 5. Restart
```bash
systemctl restart clawdbot-{agent}
# Wait 8 seconds, then verify:
journalctl -u clawdbot-{agent} --since "5 sec ago" | grep model
```

### 6. Update tracking
- Update [[02-Fleet/Fleet Map]]
- Update [[05-Knowledge/Fleet Model Plan]]
- Update the agent's profile in `02-Fleet/`
- Update `control-centre/fleet.config.js` (dashboard display)
