hermes - 💡(How to fix) Fix [Bug]: hermes setup can overwrite auxiliary model choices saved by picker [1 pull requests]

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…

Error Message

Additional Logs / Traceback (optional)

No traceback; this is silent config loss.

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

auxiliary:
  compression:
    provider: gemini
    model: gemini-2.5-flash

---

_refreshed = load_config()
config.clear()
config.update(_refreshed)
RAW_BUFFERClick to expand / collapse

Bug Description

hermes setup can overwrite configuration changes made by the shared model/provider picker before the setup wizard exits.

This affects auxiliary task model choices made during setup. For example, if the picker writes an auxiliary override such as:

auxiliary:
  compression:
    provider: gemini
    model: gemini-2.5-flash

the setup wizard can later save its stale in-memory config snapshot and reset that choice back to auto.

This is the same stale-config class as the custom-provider overwrite issue, but the current resync only preserves selected top-level keys (model, custom_providers). Any other section written by the shared picker can still be lost.

Steps to Reproduce

  1. Start with default config where auxiliary.compression.provider is auto.
  2. Run the setup model flow and choose an auxiliary model/provider override from the delegated picker path.
  3. Allow setup to complete so the outer wizard performs its final save_config(config).
  4. Inspect ~/.hermes/config.yaml.

Minimal regression shape:

  1. Load setup's in-memory config.
  2. Simulate select_provider_and_model() writing auxiliary.compression.provider = gemini and model = gemini-2.5-flash to disk.
  3. Return to setup_model_provider().
  4. Call save_config(config) as the setup wizard does on exit.

Expected Behavior

Any config changes written by the shared model/provider picker should survive the setup wizard's final save, including auxiliary task choices and future picker-owned sections.

Actual Behavior

The final setup save can write the older in-memory config object back to disk, reverting picker-written values. Current code only resyncs a small whitelist (model, custom_providers), so auxiliary choices can still be lost.

Affected Component

  • Setup / Installation
  • Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

Not attached. This is a local code-path regression with a focused unit test reproduction; no credentials or runtime logs are needed to reproduce it.

Operating System

Ubuntu 24.04

Python Version

Python 3.11.15

Hermes Version

Hermes Agent v0.13.0 (2026.5.7), observed against commit 242da9db9.

Additional Logs / Traceback (optional)

No traceback; this is silent config loss.

Root Cause Analysis (optional)

setup_model_provider(config) delegates to select_provider_and_model(). That picker and its subflows perform their own load_config() / save_config() cycle and write to config.yaml directly.

The outer setup wizard still holds the earlier config dict loaded at wizard startup. When setup later calls save_config(config), that stale object can overwrite what the picker wrote.

The current code partially mitigates this by copying back model and custom_providers after the picker returns, but the same root cause applies to any picker-written section, including auxiliary.

Proposed Fix (optional)

After the shared picker returns, reload config.yaml and refresh the caller's dict in place:

_refreshed = load_config()
config.clear()
config.update(_refreshed)

This preserves object identity for the rest of setup while ensuring the final wizard save uses the latest on-disk config.

Are you willing to submit a PR for this?

Yes. PR incoming.

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 [Bug]: hermes setup can overwrite auxiliary model choices saved by picker [1 pull requests]