mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
Three independent fixes batched together: 1. hermes auth add crashes on non-interactive stdin (#10468) input() for the label prompt was called without checking isatty(). In scripted/CI environments this raised EOFError. Fix: check sys.stdin.isatty() and fall back to the computed default label. 2. Subcommand help prints twice (#10230) 'hermes dashboard -h' printed help text twice because the SystemExit(0) from argparse was caught by the fallback retry logic, which re-parsed and printed help again. Fix: re-raise SystemExit with code 0 (help/version) immediately. 3. Duplicate entries in /model picker (#10526, #9545) - Kimi showed 2x because kimi-coding and kimi-coding-cn both mapped to the same models.dev ID. Fix: track seen mdev_ids and skip aliases. - Providers could show 2-3x from case-variant slugs across the four loading paths. Fix: normalize all seen_slugs membership checks and insertions to lowercase. Closes #10468, #10230, #10526, #9545
This commit is contained in:
parent
a6ad8ace29
commit
b750c720cd
3 changed files with 28 additions and 12 deletions
|
|
@ -4,6 +4,7 @@ from __future__ import annotations
|
|||
|
||||
from getpass import getpass
|
||||
import math
|
||||
import sys
|
||||
import time
|
||||
from types import SimpleNamespace
|
||||
import uuid
|
||||
|
|
@ -160,7 +161,10 @@ def auth_add_command(args) -> None:
|
|||
default_label = _api_key_default_label(len(pool.entries()) + 1)
|
||||
label = (getattr(args, "label", None) or "").strip()
|
||||
if not label:
|
||||
label = input(f"Label (optional, default: {default_label}): ").strip() or default_label
|
||||
if sys.stdin.isatty():
|
||||
label = input(f"Label (optional, default: {default_label}): ").strip() or default_label
|
||||
else:
|
||||
label = default_label
|
||||
entry = PooledCredential(
|
||||
provider=provider,
|
||||
id=uuid.uuid4().hex[:6],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue