Problem
When the primary model's context limit is exceeded, OpenClaw currently freezes/errors instead of falling back to a configured fallback model.
The agents.defaults.model.fallbacks config exists, but fallback only triggers on API errors (529 overloaded, timeouts, etc.) — not on context overflow.
Use Case
- Primary:
anthropic/claude-opus-4-5 (200k context)
- Fallback:
moonshot/kimi-k2.5 (256k context)
When a conversation exceeds 200k tokens, I'd expect it to automatically try Kimi (which has more headroom) instead of failing.
Expected Behavior
- Detect context would exceed primary model's limit
- Check if any fallback model has sufficient context
- Automatically route to fallback with enough headroom
- Log the fallback event
Current Behavior
Session freezes or errors when context exceeds limit. Fallback is never attempted.
Environment
- OpenClaw: 2026.2.3-1
- Primary: anthropic/claude-opus-4-5
- Fallback: moonshot/kimi-k2.5
Problem
When the primary model's context limit is exceeded, OpenClaw currently freezes/errors instead of falling back to a configured fallback model.
The
agents.defaults.model.fallbacksconfig exists, but fallback only triggers on API errors (529 overloaded, timeouts, etc.) — not on context overflow.Use Case
anthropic/claude-opus-4-5(200k context)moonshot/kimi-k2.5(256k context)When a conversation exceeds 200k tokens, I'd expect it to automatically try Kimi (which has more headroom) instead of failing.
Expected Behavior
Current Behavior
Session freezes or errors when context exceeds limit. Fallback is never attempted.
Environment