← 返回 Skills 市场
AI模型切换器
作者
savidwilbert
· GitHub ↗
· v1.0.0
· MIT-0
119
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-model-switcher
功能描述
AI模型切换器:日常本地模型 + 复杂任务云模型的混合使用方案。根据任务类型自动选择最优模型,最大化利用本地模型(零token成本),最小化云模型token消耗。
使用说明 (SKILL.md)
🎩 AI模型切换器
概述
AI模型切换器是一个为OpenClaw用户设计的智能模型切换工具。采用日常本地模型 + 复杂任务云模型的混合使用策略,根据任务类型自动选择最优模型,实现成本优化和性能平衡。
核心价值
- 零成本日常使用:最大化利用本地模型(Ollama)
- 智能任务识别:7种任务类型自动匹配最优模型
- 成本透明化:详细的token消耗和成本统计
- 易于使用:简单的OpenClaw命令接口
快速开始
安装后使用
# 查看系统状态
openclaw skill ai-model-switcher status
# 日常对话模式(本地模型,零成本)
openclaw skill ai-model-switcher chat
# 研究模式(推理云模型)
openclaw skill ai-model-switcher research
# 编程模式(云模型)
openclaw skill ai-model-switcher code
# 查看使用统计
openclaw skill ai-model-switcher stats
功能特性
1. 智能任务识别
| 任务类型 | 命令 | 推荐模型 | 描述 |
|---|---|---|---|
| 日常对话 | chat |
本地模型 | 日常聊天、简单问答 |
| 简单问答 | simple |
本地模型 | 信息查询、基础问题 |
| 研究分析 | research |
推理云模型 | 复杂推理、研究任务 |
| 长文档处理 | longdoc |
Kimi云模型 | 长文本分析、多文件处理 |
| 编程开发 | code |
DeepSeek云模型 | 代码生成、技术问题 |
| 数据分析 | analysis |
推理云模型 | 数据分析、统计计算 |
| 创意写作 | creative |
DeepSeek云模型 | 创意写作、内容生成 |
2. 成本优化策略
- 激进模式:尽可能使用本地模型,最小化成本
- 平衡模式:智能平衡本地和云模型使用(默认)
- 性能模式:优先使用高性能云模型
3. 支持的模型
- 本地模型:
ollama:deepseek-r1:14b(零成本) - DeepSeek通用模型:
deepseek/deepseek-chat - DeepSeek推理模型:
deepseek/deepseek-reasoner - Kimi长文本模型:
moonshot/kimi-k2.5
配置文件
技能使用JSON配置文件,支持完全自定义:
- 添加新模型
- 定义新任务类型
- 调整成本策略
- 启用/禁用功能
使用统计
技能记录详细的使用信息:
- 模型切换次数
- Token消耗统计
- 成本计算
- 切换历史记录
故障排除
常见问题
- 技能无法安装:检查OpenClaw版本和网络连接
- 命令不工作:确保技能已正确安装和加载
- 模型切换失败:检查模型配置和API密钥
获取帮助
- 查看详细文档:
docs/README.md - 报告问题:通过OpenClaw社区
- 功能建议:欢迎提出改进建议
许可证
本项目采用 MIT-0 License,允许商业使用、修改和分发。
关于作者
小六管家 - OpenClaw智能助手开发者
开发理念
- 用户至上:以用户需求为核心
- 技术实用:注重实际使用效果
- 持续改进:根据反馈不断优化
- 开源共享:促进技术交流和进步
安全使用建议
This skill appears to be what it says: a local/cloud model switcher implemented with scripts and local config files. Before installing or enabling auto-switching: 1) review the config/config.json location so you know where logs and stats are written; 2) if you don't want any automatic cloud usage or unexpected token costs, set "autoSwitch": false or change costStrategy to "aggressive" to favor local models; 3) verify OpenClaw and (if you want local inference) Ollama are installed and configured; 4) confirm cloud model credentials live in your OpenClaw/global configuration (not the skill) and understand any billing implications. If you want extra assurance, inspect the skill folder after installation to confirm no unexpected files or outbound network calls are present.
功能分析
Type: OpenClaw Skill
Name: ai-model-switcher
Version: 1.0.0
The ai-model-switcher skill is a legitimate utility designed to help users transition between local (Ollama) and cloud-based AI models (DeepSeek, Kimi) to optimize costs. The core logic in scripts/ai-model-switcher.txt (PowerShell) manages local configuration, usage statistics, and logging, and it provides instructions for model switching via the OpenClaw CLI without performing any unauthorized network calls, data exfiltration, or persistence-related activities.
能力评估
Purpose & Capability
Name/description (model switching, cost optimization) match the included files and instructions: the skill reads a local JSON config, shows status, logs switches, and generates openclaw commands to set models. Required binary is only openclaw (plus a recommended ollama for local models), which is proportionate.
Instruction Scope
Runtime instructions and the PowerShell script operate on the skill's config, stats, and log files and call 'openclaw config get' (and suggest running 'openclaw config set'). They do not exfiltrate data or call external endpoints. Note: the skill records model switches and token/count stats to local files; autoSwitch (true by default) can cause automatic switches which may increase cloud token usage.
Install Mechanism
No install spec or remote downloads; this is instruction-and-script-only, so nothing is fetched from external URLs or written outside the skill's directory except logs/config produced at runtime.
Credentials
The skill requests no environment variables or credentials. It references 'ollama' as recommended for local models and cloud model IDs in config, but it does not require API keys or other unrelated secrets.
Persistence & Privilege
always:false and user-invocable (normal). The skill writes its own config, logs, and stats under its config directory (expected). Because autoSwitch defaults to true, the agent could autonomously change active models (potentially switching to cloud models that incur token costs) — this is operational rather than malicious, but users should be aware.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-model-switcher - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-model-switcher触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
ai-model-switcher 1.0.0 – Initial Release
- Introduces automatic AI model switching between local and cloud models based on task type.
- Supports 7 task modes (chat, simple, research, longdoc, code, analysis, creative) with model recommendations.
- Provides cost optimization strategies (aggressive, balanced, performance).
- Tracks usage statistics: model switches, token consumption, and cost.
- Includes customizable configuration for models, task types, and optimization strategy.
- Simple command-line interface for status checks, chat, code, research, and statistics.
元数据
常见问题
AI模型切换器 是什么?
AI模型切换器:日常本地模型 + 复杂任务云模型的混合使用方案。根据任务类型自动选择最优模型,最大化利用本地模型(零token成本),最小化云模型token消耗。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 119 次。
如何安装 AI模型切换器?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-model-switcher」即可一键安装,无需额外配置。
AI模型切换器 是免费的吗?
是的,AI模型切换器 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
AI模型切换器 支持哪些平台?
AI模型切换器 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 AI模型切换器?
由 savidwilbert(@savidwilbert)开发并维护,当前版本 v1.0.0。
推荐 Skills