modelstudioai / modelstudioai/cli

[bug] config agent --agent hermes writes to ~/.hermes instead of $HERMES_HOME, config silently never takes effect

Ouverte
#131 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
333
Forks
28
Merge moyen
1 j 9 h
PR mergées (30 j)
33

Description

Environment

  • CLI: bl 1.13.0
  • Skill: 1.13.0
  • Node: v22.23.1
  • OS: Windows (MINGW64_NT-10.0-26200, git-bash/MSYS2)
  • Region: cn-beijing (Token Plan)
  • Target agent: hermes

Reproduce

# HERMES_HOME is set (or Hermes uses its Windows platform default)
export HERMES_HOME='C:\Users\<user>\AppData\Local\hermes'

bl config agent --agent hermes --region cn-beijing --key <REDACTED> --model qwen3.8-max-preview

Output:

Warning: Hermes Agent does not support native Windows. Please use WSL2.
Hermes Agent configured successfully.
  Written: C:\Users\<user>\.hermes\config.yaml
  Run `hermes chat -q "hello"` to verify.

Expected

bl config agent --agent hermes should write the model config to the location Hermes actually reads:

  • $HERMES_HOME/config.yaml (e.g. C:\Users\<user>\AppData\Local\hermes\config.yaml) when HERMES_HOME is set, or
  • Hermes' platform-native default home (%LOCALAPPDATA%\hermes\config.yaml on Windows, ~/.hermes on Linux/macOS).

Hermes resolves its home via get_hermes_home(): override → HERMES_HOME env var → platform-native default (see hermes-agent hermes_cli/config.py).

Actual

The CLI hardcodes ~/.hermes/config.yaml (join(homedir(), '.hermes', 'config.yaml') in the hermes writer) and ignores HERMES_HOME entirely.

On Windows (where Hermes' default home is %LOCALAPPDATA%\hermes) — or on any machine where HERMES_HOME is customized — the config is written to a file Hermes never reads:

  • Written to: C:\Users\<user>\.hermes\config.yaml (exists, but Hermes ignores it)
  • Hermes actually reads: C:\Users\<user>\AppData\Local\hermes\config.yaml (still has the old model/provider)

Result: the command reports success, but the model/provider change silently does not take effect. In our case Hermes kept using the previous provider (deepseek) and the Bailian models never appeared in the model picker. Only after manually applying the same values with hermes config set model.provider custom / model.default / model.base_url / model.api_key did it take effect.

Additional detail: the same hardcoded ~/.hermes assumption appears in the agent-skill/inventory detection paths for hermes (paths: [join(home, '.hermes', 'config.yaml')]), so bl config agent can also falsely report a hermes agent as "not configured" when HERMES_HOME is non-default.

Full output

Warning: Hermes Agent does not support native Windows. Please use WSL2.
Hermes Agent configured successfully.
  Written: C:\Users\<user>\.hermes\config.yaml
  Run `hermes chat -q "hello"` to verify.
Exit code: 0

Already tried

  • Confirmed CLI and installed skill versions aligned at 1.13.0.
  • Confirmed $HERMES_HOME is set to C:\Users\<user>\AppData\Local\hermes in the environment.
  • Verified Hermes load_config() reads $HERMES_HOME/config.yaml (not ~/.hermes/config.yaml).
  • Fixed locally with hermes config set model.provider custom + model.default + model.base_url + model.api_key — takes effect immediately.

Notes

  • Frequency: always (deterministic path bug)
  • Invoked via: agent (Hermes) on Windows git-bash
  • Impact: bl config agent --agent hermes silently no-ops on Windows / non-default HERMES_HOME setups; user believes Bailian is configured but the agent keeps using the old provider.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par le point d’entrée bl config agent --agent hermes et examinez la construction du chemin join(homedir(), '.hermes', 'config.yaml') du writer Hermes. Examinez ensuite les chemins de détection de Hermes dans agent-skill/inventory mentionnés dans l’issue. Le travail est terminé lorsque la configuration et la détection suivent l’override de Hermes, HERMES_HOME et la résolution par défaut de la plateforme, au lieu de supposer ~/.hermes.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Clairement spécifiée
Accessibilité débutants
74/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.