← Back to Skills Marketplace
AI模型切换器
by
savidwilbert
· GitHub ↗
· v1.0.0
· MIT-0
119
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-model-switcher
Description
AI模型切换器:日常本地模型 + 复杂任务云模型的混合使用方案。根据任务类型自动选择最优模型,最大化利用本地模型(零token成本),最小化云模型token消耗。
README (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智能助手开发者
开发理念
- 用户至上:以用户需求为核心
- 技术实用:注重实际使用效果
- 持续改进:根据反馈不断优化
- 开源共享:促进技术交流和进步
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install ai-model-switcher - After installation, invoke the skill by name or use
/ai-model-switcher - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is AI模型切换器?
AI模型切换器:日常本地模型 + 复杂任务云模型的混合使用方案。根据任务类型自动选择最优模型,最大化利用本地模型(零token成本),最小化云模型token消耗。 It is an AI Agent Skill for Claude Code / OpenClaw, with 119 downloads so far.
How do I install AI模型切换器?
Run "/install ai-model-switcher" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is AI模型切换器 free?
Yes, AI模型切换器 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does AI模型切换器 support?
AI模型切换器 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created AI模型切换器?
It is built and maintained by savidwilbert (@savidwilbert); the current version is v1.0.0.
More Skills