NadirClaw provides automatic fallback chains and budget controls to keep your LLM usage resilient and predictable.
Fallback chains
Define an ordered list of models to try when the primary model fails. NadirClaw moves to the next model in the chain on any trigger condition.
~/.nadirclaw/.env
NADIRCLAW_FALLBACK_CHAIN=claude-sonnet-4-20250514,gpt-4o,gemini-2.5-pro
Trigger conditions
- 429 rate limit -- Provider returns a rate-limit error.
- 5xx server error -- Provider returns any server-side error.
- Timeout -- Request exceeds the configured timeout.
Per-model rate limits
Proactively throttle requests to avoid hitting provider rate limits:
~/.nadirclaw/.env
# JSON map of model -> requests per minute
NADIRCLAW_MODEL_RATE_LIMITS={"claude-sonnet-4-20250514": 60, "gpt-4o": 100}
# Default RPM for models not in the map
NADIRCLAW_DEFAULT_MODEL_RPM=50Budget controls
Set daily and monthly spending limits. NadirClaw tracks cost in real time and alerts or blocks requests when thresholds are reached.
~/.nadirclaw/.env
NADIRCLAW_DAILY_BUDGET=10.00 NADIRCLAW_MONTHLY_BUDGET=200.00 NADIRCLAW_BUDGET_WARN_THRESHOLD=0.8
Check budget status
Budget command
nadirclaw budget # Output: # Daily budget: $10.00 # Spent today: $3.47 (34.7%) # Monthly budget: $200.00 # Spent this month: $42.18 (21.1%) # Status: OK