DEV Community

sophiaashi
sophiaashi

Posted on

OpenClaw Model Circuit Breaker: What It Is and Why You Need One

Just saw a feature request for model circuit breakers in the OpenClaw repo (issue #55536). This is something I have been running externally for months and it changed everything.

The Problem

When your LLM provider starts failing — rate limits, 503 errors, degraded quality — OpenClaw keeps retrying the same broken endpoint. You get cascading errors and your entire session dies.

What a Circuit Breaker Does

Same pattern web services use for database failover:

  1. Model fails 3 times consecutively → circuit OPENS (model disabled)
  2. Requests auto-route to healthy alternative
  3. After 5-minute cooldown → circuit HALF-OPEN (test request)
  4. If test succeeds → circuit CLOSES (model re-enabled)
  5. If test fails → stay open, try again in 5 minutes

Why This Matters

  • No more cascading failures when one provider has issues
  • Work never stops — automatic failover to alternatives
  • You stop burning rate limit retries on a provider that is clearly down

My Setup

I use TeamoRouter which handles circuit breaking across Claude, GPT-4o, DeepSeek, Gemini, and MiniMax. When Claude rate-limits me, traffic shifts to DeepSeek automatically. When Claude recovers, traffic shifts back.

Free tier available with unlimited MiniMax M2.7 calls (teamo-free mode).


Discord for failover configs and circuit breaker setup help.

Top comments (0)