Search

PythonReactSEOPDF
OpenClaw

llm-supervisor

Graceful rate limit handling with Ollama fallback. Notifies on rate limits, offers local model switch with confirmation for code tasks.

dhardie0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install dhardie/llm-supervisor

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

LLM Supervisor 🔮

Handles rate limits and model fallbacks gracefully.

Behavior

On Rate Limit / Overload Errors

When I encounter rate limits or overload errors from cloud providers (Anthropic, OpenAI):

  1. Tell the user immediately — Don't silently fail or retry endlessly
  2. Offer local fallback — Ask if they want to switch to Ollama
  3. Wait for confirmation — Never auto-switch for code generation tasks
Confirmation Required

Before using local models for code generation, ask:

"Cloud is rate-limited. Switch to local Ollama (qwen2.5:7b)? Reply 'yes' to confirm."

For simple queries (chat, summaries), can switch without confirmation if user previously approved.

Commands

/llm status

Report current state:

  • Which provider is active (cloud/local)
  • Ollama availability and models
  • Recent rate limit events
/llm switch local

Manually switch to Ollama for the session.

/llm switch cloud

Switch back to cloud provider.

Using Ollama

# Check available models
ollama list

# Run a query
ollama run qwen2.5:7b "your prompt here"

# For longer prompts, use stdin
echo "your prompt" | ollama run qwen2.5:7b

Installed Models

Check with ollama list. Configured default: qwen2.5:7b

State Tracking

Track in memory during session:

  • currentProvider: "cloud" | "local"
  • lastRateLimitAt: timestamp or null
  • localConfirmedForCode: boolean

Reset to cloud at session start.

Source information

Source
github
Repository
openclaw/skills
Path
skills/dhardie/llm-supervisor
Version
—
Commit
2ac2355c91c04f62ae6b0b135fd261d6524ec2d6
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

LLM Supervisor

Automatically switches OpenClaw between cloud and local LLMs when rate limits occur — without silently degrading code quality.

What this skill does

  • Monitors cloud LLM errors (e.g. Anthropic rate limits)
  • Automatically switches the main agent to a local Ollama model
  • Ensures new agents inherit the active LLM mode
  • Requires explicit user confirmation before running code tasks on local LLMs
  • Automatically switches back to cloud when manually requested

Why this exists

Cloud LLMs are powerful but rate-limited.
Local LLMs are reliable but weaker for code.

This skill provides:

  • Reliability without dead bots
  • Transparency when switching models
  • Safety for production codebases

Default behavior

  • Enabled by default
  • Auto-switches to local on cloud rate limit
  • Chat and planning are always allowed
  • Code tasks on local require confirmation: CONFIRM LOCAL CODE

Commands

  • /llm status — show current mode
  • /llm switch local — force local mode
  • /llm switch cloud — return to cloud

Configuration

The following options are configurable:

  • localModel (default: qwen2.5:7b)
  • cooldownMinutes
  • requireConfirmationForLocalCode
  • confirmationPhrase

Safety

This skill will never:

  • Silently downgrade code generation quality
  • Burn cloud credits unexpectedly
  • Modify existing agents mid-task

License

MIT

Extracted content

SKILL.md
# LLM Supervisor 🔮

Handles rate limits and model fallbacks gracefully.

## Behavior

### On Rate Limit / Overload Errors

When I encounter rate limits or overload errors from cloud providers (Anthropic, OpenAI):

1. **Tell the user immediately** — Don't silently fail or retry endlessly
2. **Offer local fallback** — Ask if they want to switch to Ollama
3. **Wait for confirmation** — Never auto-switch for code generation tasks

### Confirmation Required

Before using local models for code generation, ask:
> "Cloud is rate-limited. Switch to local Ollama (`qwen2.5:7b`)? Reply 'yes' to confirm."

For simple queries (chat, summaries), can switch without confirmation if user previously approved.

## Commands

### `/llm status`
Report current state:
- Which provider is active (cloud/local)
- Ollama availability and models
- Recent rate limit events

### `/llm switch local`
Manually switch to Ollama for the session.

### `/llm switch cloud`
Switch back to cloud provider.

## Using Ollama

```bash
# Check available models
ollama list

# Run a query
ollama run qwen2.5:7b "your prompt here"

# For longer prompts, use stdin
echo "your prompt" | ollama run qwen2.5:7b
```

## Installed Models

Check with `ollama list`. Configured default: `qwen2.5:7b`

## State Tracking

Track in memory during session:
- `currentProvider`: "cloud" | "local"  
- `lastRateLimitAt`: timestamp or null
- `localConfirmedForCode`: boolean

Reset to cloud at session start.
README
# LLM Supervisor

Automatically switches OpenClaw between cloud and local LLMs when rate limits occur — without silently degrading code quality.

## What this skill does

- Monitors cloud LLM errors (e.g. Anthropic rate limits)
- Automatically switches the **main agent** to a local Ollama model
- Ensures **new agents inherit** the active LLM mode
- Requires **explicit user confirmation** before running code tasks on local LLMs
- Automatically switches back to cloud when manually requested

## Why this exists

Cloud LLMs are powerful but rate-limited.  
Local LLMs are reliable but weaker for code.

This skill provides:
- Reliability without dead bots
- Transparency when switching models
- Safety for production codebases

## Default behavior

- Enabled by default
- Auto-switches to local on cloud rate limit
- Chat and planning are always allowed
- Code tasks on local require confirmation:
  `CONFIRM LOCAL CODE`

## Commands

- `/llm status` — show current mode
- `/llm switch local` — force local mode
- `/llm switch cloud` — return to cloud

## Configuration

The following options are configurable:

- `localModel` (default: `qwen2.5:7b`)
- `cooldownMinutes`
- `requireConfirmationForLocalCode`
- `confirmationPhrase`

## Safety

This skill will never:
- Silently downgrade code generation quality
- Burn cloud credits unexpectedly
- Modify existing agents mid-task

## License

MIT

Related skills

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.