hermes - ✅(Solved) Fix 模型选择器 /model 支持置顶常用模型(favorites / LRU) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#25363Fetched 2026-05-14 03:47:00
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×5cross-referenced ×2commented ×1

PR fix notes

PR #25372: feat: model picker favorites/LRU + reasoning sub-picker

Description (problem / solution / changelog)

Summary

Closes #25363, closes #25364

Feature A: Model Favorites & LRU Ordering

  • Added model.recent (LRU, max 10) and model.favorites (pinned) to config
  • Migrated old model: "string" to model: {default: ..., recent: [], favorites: [], reasoning_defaults: {}}
  • Model picker now sorts: favorites (★) first, recents (🕐) second, rest as-is
  • Added /model --favorite <name> and /model --unfavorite <name> commands

Feature B: Reasoning Configuration in Picker

  • Added supports_reasoning(model_id, provider) detecting o1/o3/o4, gpt-5, claude-sonnet-4/opus-4, deepseek-r1, grok-4, gemini-2.5, qwq
  • After selecting a reasoning-capable model, a lightweight sub-picker shows effort levels (none/low/medium/high)
  • Reasoning defaults are persisted per model in model.reasoning_defaults

Files Changed

  • cli.py: +189 lines (picker sorting, LRU, favorites, reasoning stage)
  • hermes_cli/config.py: +23 lines (dict migration, backward compat)
  • hermes_cli/models.py: +53 lines (supports_reasoning function)

Test Plan

  • 101 model-related tests pass (validation, persistence, picker viewport)
  • Manual verification of supports_reasoning() for all known patterns
  • Manual verification of config migration (old string -> new dict, pass-through, empty)

Changed files

  • cli.py (modified, +185/-4)
  • hermes_cli/config.py (modified, +21/-2)
  • hermes_cli/models.py (modified, +53/-0)

Code Example

# config.yaml
model:
  default: "deepseek/deepseek-chat"
  favorites:
    - "deepseek/deepseek-chat"
    - "anthropic/claude-sonnet-4"
RAW_BUFFERClick to expand / collapse

Feature Description

模型选择器(/model 或 hermes model)中,把用户常用的几个模型置顶显示,便于快速切换。

Motivation

目前模型选择器按默认顺序列出所有可用模型,每次切换都需要翻找。常用模型可能只有 2-3 个,把它们放在列表顶部可以大幅减少切换耗时。

Proposed Solution

方案 A(LRU):自动将最近使用的 3-5 个模型置顶显示。 方案 B(手动置顶):在 config.yaml 中添加 model.favorites,用户手动指定常用模型列表。 方案 C(结合):默认 LRU + 支持手动固定(pinned)。

# config.yaml
model:
  default: "deepseek/deepseek-chat"
  favorites:
    - "deepseek/deepseek-chat"
    - "anthropic/claude-sonnet-4"

Alternatives Considered

  • 手动输入完整模型名:需要记住 ID,不够直观
  • 多次 /model 操作:目前每会话一次够用,但切换不方便

Scope

Small — CLI 选择器 UI 逻辑 + 配置读取。涉及文件:cli.py 的 model picker、config 解析。

Additional Context

Claude Code 的 /model 会把最近使用的模型放最上面,体验很好。

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix 模型选择器 /model 支持置顶常用模型(favorites / LRU) [1 pull requests, 1 comments, 2 participants]