当前位置: 首页 > Skill >

Hermes Profile Model Manager

Hermes Profile Model Manager

Hermes Profile Model Manager

查看、更换和管理 Hermes 各 profile 的大模型配置(主模型、辅助模型、delegation 模型)。支持单个/批量操作、切换 provider、全 profile 一览。

3.6.0 2026.11.27 159
获取Skill文件查看使用说明
作 者:陆安 许可证: 更新时间:2026.11.27
本文目录展开

Profile Model Manager

管理 Hermes 各 profile 的全部模型配置——主模型、辅助模型(vision / compression / web_extract / session_search)、delegation 模型。支持查看、切换、批量操作。

适用场景: 需要查看或切换 Hermes 各 profile 的大模型时使用本 skill。 不适用场景: 安装新 provider、配置 API Key(参见 hermes-agent skill);管理 MCP 模型(参见 native-mcp skill)。

0. 快速开始

30 秒上手:

# 1. 查看当前所有 profile 模型全景
bash ~/.hermes/scripts/profile-model-overview.sh

# 2. 切换 default profile 主模型
hermes config set model.default glm-5-turbo
hermes config set model.provider zai

# 3. 重启生效
hermes gateway restart

前置条件:

  • Hermes Agent 已安装(hermes --version 可用)
  • 目标 provider 的 API Key 已配置在对应 profile 的 .env 中
  • 切换后必须重启 Gateway 才能生效

1. 模型配置架构

每个 profile 的 config.yaml 中有三个模型相关配置块:

model:          ← 主模型(对话用)
auxiliary:      ← 辅助模型(vision / compression / web_extract / session_search)
delegation:     ← 子 agent 模型(delegate_task 时使用)

1.1 主模型 model:

model:
  default: mimo-v2.5-pro        # 模型名称
  provider: xiaomi               # provider 名称
  base_url: https://...          # API 端点(部分 provider 可省略)
  api_key: xxx                   # 可选,也可放 .env
  context_length: 200000         # 上下文窗口大小
  api_mode: chat_completions     # API 模式

1.2 辅助模型 auxiliary:

auxiliary:
  vision:                        # 图片分析、截图识别
    provider: xiaomi
    model: mimo-v2-omni
    base_url: https://...
    timeout: 120
  compression:                   # 上下文压缩
    provider: xiaomi
    model: mimo-v2.5
    base_url: https://...
    timeout: 120
  web_extract:                   # 网页内容提取
    provider: xiaomi
    model: mimo-v2.5
    base_url: https://...
    timeout: 360
  session_search:                # 历史会话搜索
    provider: xiaomi
    model: mimo-v2.5
    base_url: https://...
    timeout: 30
    max_concurrency: 3

1.3 Delegation 模型 delegation:

delegation:
  model: mimo-v2.5               # 空则继承主模型
  provider: xiaomi
  base_url: ''                   # 空则继承主模型 base_url
  reasoning_effort: ''
  max_iterations: 50
  max_concurrent_children: 3

2. 查看模型配置

# 查看 default profile 的完整配置
hermes config show

# 查看指定 profile 的主模型
cat ~/.hermes/profiles/<name>/config.yaml | grep -A5 "^model:"

# 查看指定 profile 的辅助模型
cat ~/.hermes/profiles/<name>/config.yaml | grep -A20 "^auxiliary:"

# 查看指定 profile 的 delegation 模型
cat ~/.hermes/profiles/<name>/config.yaml | grep -A10 "^delegation:"

# 一键查看所有 profile 模型全景
bash ~/.hermes/scripts/profile-model-overview.sh

3. 切换模型

3.1 切换单个 profile 的主模型

# 对 default profile(不加 -p 参数)
hermes config set model.default <model_name>
hermes config set model.provider <provider>
hermes config set model.base_url <base_url>

# 对其他 profile(必须加 -p <name>)
hermes -p <profile> config set model.default <model_name>
hermes -p <profile> config set model.provider <provider>
hermes -p <profile> config set model.base_url <base_url>

切换后必须重启:

hermes -p <profile> gateway restart

3.2 切换辅助模型

hermes config set auxiliary.vision.provider <provider>
hermes config set auxiliary.vision.model <model>
hermes config set auxiliary.vision.base_url <url>

hermes config set auxiliary.compression.provider <provider>
hermes config set auxiliary.compression.model <model>

hermes config set auxiliary.web_extract.provider <provider>
hermes config set auxiliary.web_extract.model <model>

hermes config set auxiliary.session_search.provider <provider>
hermes config set auxiliary.session_search.model <model>

Per-profile 用法同理加 -p <name>。

3.3 切换 Delegation 模型

hermes -p <profile> config set delegation.model <model>
hermes -p <profile> config set delegation.provider <provider>

设为空字符串即回到继承主模型的行为:

hermes -p <profile> config set delegation.model ""
hermes -p <profile> config set delegation.provider ""

3.4 批量操作所有 profile

# 切换所有 profile 主模型
for p in default cto diary genshin reasoner scout qian-duoduo; do
  if [ "$p" = "default" ]; then
    hermes config set model.default glm-5-turbo
    hermes config set model.provider zai
  else
    hermes -p "$p" config set model.default glm-5-turbo
    hermes -p "$p" config set model.provider zai
  fi
done

3.5 批量重启 Gateway

# 重启所有运行中的 profile
hermes profile list 2>/dev/null | grep "running" | awk '{print $1}' | sed 's/◆//' | while read p; do
  hermes -p "$p" gateway restart
done

4. Provider 速查表

Provider Env 变量 Base URL 说明
xiaomi XIAOMI_API_KEY https://token-plan-cn.xiaomimimo.com/v1 小米 MiMo
zai GLM_API_KEY https://open.bigmodel.cn/api/coding/paas/v4 智谱 GLM
openrouter OPENROUTER_API_KEY — OpenRouter
anthropic ANTHROPIC_API_KEY — Anthropic Claude
deepseek DEEPSEEK_API_KEY — DeepSeek
xai XAI_API_KEY — xAI Grok
gemini GOOGLE_API_KEY — Google Gemini
openai-codex — (OAuth) — OpenAI Codex
copilot COPILOT_GITHUB_TOKEN — GitHub Copilot
kimi-coding KIMI_API_KEY — Kimi/Moonshot
minimax MINIMAX_API_KEY — MiniMax
alibaba DASHSCOPE_API_KEY — 阿里 DashScope

自定义 Provider 在 config.yaml 的 custom_providers: 中定义:

custom_providers:
- name: zai
  base_url: https://open.bigmodel.cn/api/coding/paas/v4
  api_key: xxx
  api_mode: chat_completions

5. 模型参考

智谱 ZAI

模型 上下文 最大输出 适用场景
glm-5-turbo 200K 128K 通用对话,高性价比
glm-5 200K 128K 通用推理
glm-5.1 200K 128K 复杂推理
glm-4.7 200K 128K 旧版主力

文档:https://docs.bigmodel.cn/cn/guide/start/model-overview

小米 MiMo

模型 上下文 适用场景
mimo-v2.5-pro 1M 通用对话、长上下文
mimo-v2.5 1M 辅助模型、高性价比
mimo-v2-omni — 多模态(vision)

6. 典型工作流

场景 1:临时切换测试模型

# 切到测试模型
hermes -p reasoner config set model.default glm-5.1
hermes -p reasoner config set model.provider zai
hermes -p reasoner gateway restart

# 验证切换成功
hermes -p reasoner config show | grep "model:" -A3

# 测试完毕后切回
hermes -p reasoner config set model.default mimo-v2.5-pro
hermes -p reasoner config set model.provider xiaomi
hermes -p reasoner gateway restart

场景 2:所有 profile 统一切换

# 批量切换
for p in default cto diary genshin reasoner scout qian-duoduo; do
  if [ "$p" = "default" ]; then
    hermes config set model.default glm-5-turbo
    hermes config set model.provider zai
  else
    hermes -p "$p" config set model.default glm-5-turbo
    hermes -p "$p" config set model.provider zai
  fi
done

# 批量重启
hermes profile list 2>/dev/null | grep "running" | awk '{print $1}' | sed 's/◆//' | while read p; do
  hermes -p "$p" gateway restart
done

场景 3:只改辅助模型

# 换一个更强的 vision 模型(主模型不变)
hermes config set auxiliary.vision.provider zai
hermes config set auxiliary.vision.model glm-5.1
hermes gateway restart

场景 4:Delegation 用便宜模型省钱

# delegation 用轻量模型,主模型保持强模型
hermes config set delegation.model glm-5-turbo
hermes config set delegation.provider zai
hermes gateway restart

7. 常见问题 (FAQ)

Q1: 切换模型后为什么没生效?

A: 模型配置只对新 session 生效,已运行的 Gateway 必须重启:

hermes -p <profile> gateway restart

验证方法:hermes -p <profile> gateway status 确认状态为 running。

Q2: 切换 provider 后报 "no API key found"?

A: 每个 profile 有独立的 .env 文件,需要确保目标 profile 的 .env 中有对应 key:

# 检查 key 是否存在
grep "ZAI|XIAOMI|DEEPSEEK" ~/.hermes/profiles/<name>/.env

# 如果没有,手动添加
echo "GLM_API_KEY=your_key_here" >> ~/.hermes/profiles/<name>/.env

Q3: 辅助模型设为空会怎样?

A: Hermes 会尝试 auto 模式自动匹配,但可能失败或选到不合适的模型。建议显式配置所有辅助模型,特别是 vision 和 compression。

Q4: hermes config set 会覆盖其他字段吗?

A: 不会。config set 是逐字段 YAML merge,只修改指定的字段,不影响其他配置。

Q5: compression 模型报错 "context too small"?

A: compression 模型的 context_length 至少需要 16K,否则压缩会失败。选择模型时注意其上下文窗口大小。

Q6: default profile 的 -p 参数写法?

A: default profile 不加 -p 参数,其他 profile 必须加 -p <name>。这是最常见的错误。

Q7: 如何确认切换后的模型实际生效了?

A:

# 方法 1:查看配置
hermes -p <profile> config show | grep "default:" -A1

# 方法 2:发送测试消息
hermes -p <profile> chat -q "你是什么模型?回答模型名称即可" -Q

# 方法 3:查看 Gateway 状态
hermes -p <profile> gateway status

8. 限制与注意事项

  1. API Key 隔离:每个 profile 有独立 .env,切换 provider 前务必确认目标 key 存在
  2. Gateway 重启必须:所有模型修改只对新 session 生效,已运行的 gateway 必须 restart
  3. 辅助模型 context_length:compression 至少需要 16K,session_search 建议 32K+
  4. 批量操作不可逆:批量切换前建议备份配置:cp ~/.hermes/profiles/<name>/config.yaml ~/.hermes/profiles/<name>/config.yaml.bak
  5. 自定义 Provider 需要 base_url:使用自定义 provider 时必须在 config set 中指定 base_url
  6. profile 名称区分大小写:Profile ≠ profile,使用 hermes profile list 确认准确名称

9. 一键全览脚本

运行以下命令查看所有 profile 的模型全景:

bash ~/.hermes/scripts/profile-model-overview.sh

脚本自动检测所有 profile,解析 config.yaml,以表格形式展示主模型、Provider、Vision、Compression、Delegation 配置。

发布到 SkillHub

参见 references/skillhub-publishing.md。SkillHub CLI 不支持 publish,需通过 Web 界面发布(手机号登录)。

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
Skill 文件
  • SKILL.md
    • Profile Model Manager
    • 0. 快速开始
    • 1. 模型配置架构
      • 1.1 主模型 model:
      • 1.2 辅助模型 auxiliary:
      • 1.3 Delegation 模型 delegation:
    • 2. 查看模型配置
    • 3. 切换模型
      • 3.1 切换单个 profile 的主模型
      • 3.2 切换辅助模型
      • 3.3 切换 Delegation 模型
      • 3.4 批量操作所有 profile
      • 3.5 批量重启 Gateway
    • 4. Provider 速查表
    • 5. 模型参考
      • 智谱 ZAI
      • 小米 MiMo
    • 6. 典型工作流
      • 场景 1:临时切换测试模型
      • 场景 2:所有 profile 统一切换
      • 场景 3:只改辅助模型
      • 场景 4:Delegation 用便宜模型省钱
    • 7. 常见问题 (FAQ)
      • Q1: 切换模型后为什么没生效?
      • Q2: 切换 provider 后报 "no API key found"?
      • Q3: 辅助模型设为空会怎样?
      • Q4: hermes config set 会覆盖其他字段吗?
      • Q5: compression 模型报错 "context too small"?
      • Q6: default profile 的 -p 参数写法?
      • Q7: 如何确认切换后的模型实际生效了?
    • 8. 限制与注意事项
    • 9. 一键全览脚本
    • 发布到 SkillHub
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期