hermes - 💡(How to fix) Fix feat: batch profile model/provider reconfiguration + YAML-aware config set

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…

Fix Action

Fix / Workaround

Users with multiple profiles (common for multi-agent setups with 10+ profiles) have no built-in way to batch-switch models/providers. The only option is custom scripts that directly patch YAML files.

Current Workaround

Users rely on custom scripts like hermes-batch-model.sh that use Python regex to patch YAML files directly. This works but is fragile and requires maintaining external tooling for something the CLI should handle natively.

Code Example

# Before
model:
  default: mimo-v2.5-free
  provider: opencode-zen
  base_url: https://opencode.ai/zen/v1
  api_mode: chat_completions

# After: hermes config set model test-value
model: test-value  # entire nested block destroyed

---

# Single profile
hermes config set --profile coder model.default claude-sonnet-4

# All profiles at once
hermes config set --all model.default claude-sonnet-4

# Multiple specific profiles
hermes config set --profile coder --profile dev-pm model.default claude-sonnet-4

---

# This should update model.default without destroying model.provider
hermes config set model.default claude-sonnet-4

# The setter should read the existing model block, update only the
# target key, and write it back preserving all other nested keys
RAW_BUFFERClick to expand / collapse

Problem

hermes config set has two critical limitations:

  1. No profile targeting — it only modifies the current active profile. There is no --profile flag to target a specific profile, making batch reconfiguration across multiple profiles impossible without manual scripting.

  2. Destroys nested YAMLhermes config set model default-value flattens the entire model: block into a scalar, destroying nested keys like model.provider, model.base_url, model.api_mode, etc. This is actively dangerous and has broken production configs.

Example of the damage:

# Before
model:
  default: mimo-v2.5-free
  provider: opencode-zen
  base_url: https://opencode.ai/zen/v1
  api_mode: chat_completions

# After: hermes config set model test-value
model: test-value  # entire nested block destroyed

Users with multiple profiles (common for multi-agent setups with 10+ profiles) have no built-in way to batch-switch models/providers. The only option is custom scripts that directly patch YAML files.

Proposed Solution

Two features:

1. hermes config set --profile NAME KEY VALUE

Allow targeting a specific profile by name. Repeated --profile flags or --all for batch:

# Single profile
hermes config set --profile coder model.default claude-sonnet-4

# All profiles at once
hermes config set --all model.default claude-sonnet-4

# Multiple specific profiles
hermes config set --profile coder --profile dev-pm model.default claude-sonnet-4

2. YAML-aware nested key handling

hermes config set should properly handle nested keys using dot notation or YAML-aware merging:

# This should update model.default without destroying model.provider
hermes config set model.default claude-sonnet-4

# The setter should read the existing model block, update only the
# target key, and write it back preserving all other nested keys

Implementation should use a YAML library (ruamel.yaml or PyYAML) to load → modify → dump rather than regex or string replacement.

Current Workaround

Users rely on custom scripts like hermes-batch-model.sh that use Python regex to patch YAML files directly. This works but is fragile and requires maintaining external tooling for something the CLI should handle natively.

Impact

Multi-profile setups (kanban workers, role-based agents, dev/test splits) are a core Hermes feature. Batch model switching is a common workflow — switching to a new provider, testing a new model across all roles, rotating API keys. Without this, users with N profiles must either edit N config files manually or maintain custom scripts.

Suggested Labels

enhancement, cli

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 - 💡(How to fix) Fix feat: batch profile model/provider reconfiguration + YAML-aware config set