搜索

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 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install dhardie/llm-supervisor

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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
github
Repository
openclaw/skills
Path
skills/dhardie/llm-supervisor
Version
—
Commit
2ac2355c91c04f62ae6b0b135fd261d6524ec2d6
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

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

来源内容

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

相关技能

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.