notestone-model-manager
本地与远程 LLM 模型管理:切换、健康检查、回退与用量统计。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~notestone-model-managercURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~notestone-model-manager/file -o notestone-model-manager.md## 概述(中文)
本地与远程 LLM 模型管理:切换、健康检查、回退与用量统计。
## 技能正文
# OpenClaw 模型管理器 v1.5 🛠️
**💰 优化 API 成本:将简单任务路由到更便宜模型。**
简单翻译或摘要为何付 **$15/1M tokens**,而可以付 **$0.60/1M**?合适任务可节省 **96%(25 倍价差)**。
**🆕 v1.5 新功能:**
- **Enhanced 集成** with [model-benchmarks](https://clawhub.ai/skills/model-benchmarks) for 实时 AI intelligence
- **Improved Cost Calculations** with latest pricing data
- **Better 任务分类** with expanded routing patterns
- **Stability Improvements** and bug fixes
## 🚀 快速开始
```bash
# 列出实时定价模型
python3 skills/model-manager/manage_models.py list
# 获取路由建议
python3 skills/model-manager/manage_models.py plan "write a Python script"
# 为成本优化配置 OpenClaw
python3 skills/model-manager/manage_models.py enable cheap
```
---
### 🇨🇳 中文说明
**💰 拒绝冤枉钱!自动路由高性价比模型,最高节省 96% Token 费用。**
**🆕 v1.5 新功能:**
- **智能数据源整合** — 配合 model-benchmarks 技能获取实时 AI 能力评测
- **精准成本计算** — 基于最新价格数据的成本估算
- **增强任务识别** — 更准确的任务类型分类和模型推荐
- **稳定性提升** — 修复已知问题,提升运行可靠性
这个 Skill 能帮你:
1. **即时比价**:列出当前 OpenRouter 上的模型价格
2. **智能配置**:自动将简单任务路由给高性价比的小模型(如 GPT-4o-mini)
3. **🆕 数据驱动推荐**:结合 AI benchmark 数据提供最优模型建议
4. **🧠 自我进化 (Self-Healing)**:如果便宜模型经常失败,系统会自动切换到更稳定的模型
---
## ⚙️ 核心功能
### 1️⃣ `list` - 实时模型定价
```bash
python3 manage_models.py list
```
获取当前 OpenRouter 定价并显示高性价比选项。
### 2️⃣ `plan` - 智能任务路由
```bash
python3 manage_models.py plan "translate this to French"
python3 manage_models.py plan "debug this Python error: TypeError..."
python3 manage_models.py plan "design a database schema"
```
**NEW in v1.5**: Enhanced task classification with better accuracy for:
- 🔧 Technical tasks (coding, debugging, system design)
- 📝 Content tasks (writing, translation, summarization)
- 🧠 Analysis tasks (data analysis, reasoning, research)
### 3️⃣ `enable` - 自动配置
```bash
python3 manage_models.py enable cheap # Maximum cost savings
python3 manage_models.py enable balanced # Quality/cost balance
python3 manage_models.py enable quality # Best performance
```
### 4️⃣ `benchmark` - 性能分析(v1.5 新增)
```bash
python3 manage_models.py benchmark --task coding
```
Integrates with [model-benchmarks](https://clawhub.ai/skills/model-benchmarks) skill for data-driven recommendations.
---
## 💡 与 Model Benchmarks 集成
**Perfect Combo**: Use Model Manager + Model Benchmarks together for maximum optimization:
```bash
# 1. Install both skills
openclaw skills install model-manager
openclaw skills install model-benchmarks
# 2. Get real-time AI intelligence
python3 skills/model-benchmarks/scripts/run.py fetch
# 3. Apply intelligent routing
python3 skills/model-manager/manage_models.py plan "your task" --use-benchmarks
```
**Result**: Up to **95% cost reduction** with maintained or improved quality!
---
## 🎯 任务分类引擎
**Enhanced in v1.5** with better pattern recognition:
| Task Type | Optimal Models | Cost Savings | Use Cases |
|-----------|---------------|--------------|-----------|
| **Simple** | GPT-4o-mini, Gemini Flash | 85-96% | Translation, summarization, Q&A |
| **Coding** | GPT-4o, Claude 3.5 Sonnet | 45-75% | Programming, debugging, code review |
| **Creative** | Claude 3.5 Sonnet, GPT-4o | 25-55% | Writing, brainstorming, content creation |
| **Complex** | Claude 3.5 Sonnet, GPT-4 | 15-35% | Architecture, research, complex analysis |
---
## 📊 实际效果
**User Reports (v1.5):**
- 🏢 **Startup Dev Team**: 78% cost reduction using intelligent routing
- 📝 **Content Agency**: 65% savings with task-specific model selection
- 🔬 **Research Lab**: 45% efficiency gain with benchmark-driven choices
---
## 🔄 v1.5 更新日志
### ✅ New Features
- **Benchmark 集成** — Real-time capability data from multiple sources
- **Enhanced Task Patterns** — Better classification accuracy
- **Cost Trend Analysis** — Track pricing changes over time
- **性能 监控** — Success rate tracking per model
### 🐛 Bug Fixes
- Fixed OpenRouter API timeout issues
- Improved error handling for network failures
- Better handling of model availability changes
- Resolved config file corruption edge cases
### ⚡ 性能 Improvements
- 40% faster model listing with caching
- Reduced memory usage for large model datasets
- Optimized routing decision algorithms
---
## 🛠️ 高级用法
### Custom Routing Rules
```python
# Create custom routing in ~/.openclaw/model-routing.json
{
"patterns": {
"translation": ["gemini-2.0-flash", "gpt-4o-mini"],
"coding": ["claude-3.5-sonnet", "gpt-4o"],
"analysis": ["gpt-4o", "claude-3.5-sonnet"]
},
"fallbacks": ["gpt-4o-mini"],
"budget_limit": 50.00
}
```
### Cost 监控
```bash
# Set up cost alerts
python3 manage_models.py monitor --budget 100 --alert-at 80%
```
### 性能 Analytics
```bash
# Generate routing report
python3 manage_models.py report --days 30 --export csv
```
---
## 🚀 路线图
### v1.6 (Coming Soon)
- **Predictive Routing** — Learn from usage patterns
- **Multi-Provider Support** — Direct API integration beyond OpenRouter
- **Custom Benchmarks** — Domain-specific performance testing
### v2.0 (Future)
- **Distributed Routing** — Cross-agent coordination
- **Real-Time Adaptation** — Dynamic model switching based on performance
- **Advanced Analytics** — Comprehensive cost and quality insights
---
## 🤝 社区
- **GitHub**: [openclaw-model-manager](https://github.com/Notestone/openclaw-model-manager)
- **Issues**: Report bugs and request features
- **Discord**: Join #model-optimization channel
- **Companion**: Use with [model-benchmarks](https://clawhub.ai/skills/model-benchmarks) for best results
**Pro Tip**: Combine this skill with automated routing via `openrouter/auto` for hands-off cost optimization!
---
*Make every token count — route smart, save big! 🛠️*