/status 成本排障技巧:显示 fallback 后的真实模型
问题:当主模型回退到次级模型时,状态页可能显示不准确,导致成本和质量归因错误。做法:用 session_status 核对“实际生效模型”。
GITHUBDiscovered 2026-02-18Author @echoVic
Prerequisites
- You run model fallback strategy (provider/model aliases) in production or staging.
- You can inspect `/status` and `session_status` outputs for the same conversation.
Steps
- Create a controlled fallback condition (for example temporarily block/quota primary model).
- Run one prompt that triggers fallback and capture model metadata from logs/status.
- Check session_status to confirm the actually used model is shown (not only requested primary).
- Use this field in cost dashboards and incident reports to avoid wrong root-cause attribution.
Commands
openclaw statusopenclaw gateway statussession_status {"sessionKey":"<session_key>"}Verify
When fallback happens, status output reflects the actual executed model/provider path.
Caveats
- Historical sessions may still carry old metadata snapshots until they run again(需验证).
- If multiple nested fallbacks exist, confirm which hop is surfaced in your build’s status format.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗